var _=Object.defineProperty;var s=(m,p)=>_(m,"name",{value:p,configurable:!0});import{defineComponent as V,computed as n,ref as C,watch as v,openBlock as x,createBlock as h,withCtx as E,createElementVNode as d,normalizeClass as b,unref as i,createVNode as k,mergeProps as D,toDisplayString as U}from"vue";import F from"primevue/colorpicker";import{c5 as u,c6 as e,c as L}from"./index-CU6LcO2W.js";import{f as O,P as R}from"./widgetPropFilter-CygYoMQt.js";import{W}from"./index-CqZHjtQN.js";import{_ as B}from"./WidgetLayoutField.vue_vue_type_script_setup_true_lang-Azr_vpNt.js";import"@primevue/themes";import"@primevue/themes/aura";import"./vendor-other-BpgYsL4Z.js";import"./vendor-vue-C7sAPp8E.js";import"primevue/config";import"primevue/confirmationservice";import"primevue/toastservice";import"primevue/tooltip";import"primevue/button";import"vue-i18n";import"primevue/message";import"primevue/skeleton";import"primevue/multiselect";import"primevue/inputtext";import"primevue/select";import"primevue/checkbox";import"primevue/divider";import"primevue/scrollpanel";import"primevue/usetoast";import"primevue/card";import"primevue/listbox";import"primevue/progressbar";import"primevue/floatlabel";import"@primevue/forms";import"@primevue/forms/resolvers/zod";import"primevue/password";import"primevue/progressspinner";import"primevue/tag";import"primevue/inputnumber";import"primevue/tabpanels";import"primevue/tabs";import"primevue/iconfield";import"primevue/inputicon";import"primevue/badge";import"primevue/chip";import"primevue/tabpanel";import"primevue/toggleswitch";import"primevue/radiobutton";import"primevue/knob";import"primevue/slider";import"primevue/panel";import"primevue/tabmenu";import"primevue/popover";import"primevue/tab";import"primevue/tablist";import"primevue";import"primevue/autocomplete";import"primevue/dropdown";import"./vendor-xterm-DV1MVhAx.js";import"./vendor-three-zdhtZbSm.js";import"primevue/galleria";import"primevue/contextmenu";import"primevue/tree";import"primevue/toolbar";import"primevue/selectbutton";import"primevue/dialog";import"primevue/confirmpopup";import"primevue/useconfirm";import"primevue/confirmdialog";import"./vendor-tiptap-mfowjb53.js";import"primevue/blockui";const N={class:"text-xs truncate min-w-[4ch]","data-testid":"widget-color-text"},To=V({__name:"WidgetColorPicker",props:{widget:{},modelValue:{}},emits:["update:modelValue"],setup(m,{emit:p}){const t=m,c=p,a=n(()=>{const o=t.widget.options?.format;return u(o)?o:"hex"}),r=C(e(t.modelValue||"#000000",u(t.widget.options?.format)?t.widget.options.format:"hex"));v(()=>t.modelValue,o=>{r.value=e(o||"#000000",a.value)});function f(o){r.value=o,c("update:modelValue",e(o,a.value))}s(f,"onPickerUpdate");const w=[...R],g=n(()=>O(t.widget.options,w));return(o,l)=>(x(),h(B,{widget:o.widget},{default:E(()=>[d("label",{class:b(i(L)(i(W),"flex items-center gap-2 w-full px-4 py-2"))},[k(i(F),D({modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=P=>r.value=P)},g.value,{class:"h-4 w-8 overflow-hidden !rounded-full border-none","aria-label":o.widget.name,pt:{preview:"!w-full !h-full !border-none"},"onUpdate:modelValue":f}),null,16,["modelValue","aria-label"]),d("span",N,U(i(e)(r.value,a.value)),1)],2)]),_:1},8,["widget"]))}});export{To as default};
//# sourceMappingURL=WidgetColorPicker-BTRp3aC9.js.map
