var _=Object.defineProperty;var n=(s,l)=>_(s,"name",{value:l,configurable:!0});import{x as P}from"./vendor-primevue-Cif--Rbw.js";import{cV as d,cW as a,c as v}from"./index-Bc79VbnU.js";import{P as x,f as C}from"./widgetPropFilter-CygYoMQt.js";import{W as h}from"./index-BBvP0bLh.js";import{_ as E}from"./WidgetLayoutField.vue_vue_type_script_setup_true_lang-CYDaxuge.js";import{a2 as b,E as p,r as k,w as D,j as U,d as W,k as B,e as u,s as F,a8 as r,z as L,m as O,u as R}from"./vendor-other-Dsj-QuOx.js";import"./vendor-vue-DNQSPQQ2.js";import"./vendor-reka-ui-WjwjFuZo.js";import"./vendor-xterm-CWYFmgbN.js";import"./vendor-three-ByuY8CdW.js";import"./vendor-tiptap-YMjM2h-Z.js";const N={class:"text-xs truncate min-w-[4ch]","data-testid":"widget-color-text"},J=b({__name:"WidgetColorPicker",props:{widget:{},modelValue:{}},emits:["update:modelValue"],setup(s,{emit:l}){const o=s,c=l,i=p(()=>{const e=o.widget.options?.format;return d(e)?e:"hex"}),t=k(a(o.modelValue||"#000000",d(o.widget.options?.format)?o.widget.options.format:"hex"));D(()=>o.modelValue,e=>{t.value=a(e||"#000000",i.value)});function f(e){t.value=e,c("update:modelValue",a(e,i.value))}n(f,"onPickerUpdate");const w=[...x],g=p(()=>C(o.widget.options,w));return(e,m)=>(W(),U(E,{widget:e.widget},{default:B(()=>[u("label",{class:F(r(v)(r(h),"flex items-center gap-2 w-full px-4 py-2"))},[L(r(P),O({modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=V=>t.value=V)},g.value,{class:"h-4 w-8 overflow-hidden !rounded-full border-none","aria-label":e.widget.name,pt:{preview:"!w-full !h-full !border-none"},"onUpdate:modelValue":f}),null,16,["modelValue","aria-label"]),u("span",N,R(r(a)(t.value,i.value)),1)],2)]),_:1},8,["widget"]))}});export{J as default};
//# sourceMappingURL=WidgetColorPicker-4E2rnL8u.js.map
