@oneclick.dev/cms-core-modules 0.0.53 → 0.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/CalendarDate-CRT2Viyt.mjs +830 -0
  2. package/dist/CalendarDate-CWtpXgpD.js +1 -0
  3. package/dist/Components-D9yIIosM.mjs +623 -0
  4. package/dist/Components-DXbx0RLV.js +1 -0
  5. package/dist/ContentEditor-BBdzuTJJ.js +290 -0
  6. package/dist/ContentEditor-HwHspQO1.mjs +35302 -0
  7. package/dist/Create-BP8TX6rj.js +1 -0
  8. package/dist/Create-Bwf1RXdG.mjs +1248 -0
  9. package/dist/DateFormatter-BbcSwTs4.js +1 -0
  10. package/dist/DateFormatter-CbO0PVUK.mjs +99 -0
  11. package/dist/Detail-B-PnkcXD.mjs +3473 -0
  12. package/dist/Detail-BVlGSjOq.mjs +380 -0
  13. package/dist/Detail-C4E1T87K.mjs +26 -0
  14. package/dist/Detail-CNfTDUE5.js +1 -0
  15. package/dist/Detail-Cd5CBVN0.js +1 -0
  16. package/dist/Detail-CpfOQChd.mjs +585 -0
  17. package/dist/Detail-CwagT6gQ.mjs +650 -0
  18. package/dist/Detail-DUo6qKqO.js +1 -0
  19. package/dist/Detail-Dd_OkpcN.js +1 -0
  20. package/dist/Detail-mvSGbnFU.js +1 -0
  21. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +1 -0
  22. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +55 -0
  23. package/dist/Entries-DcpPvlYj.js +1 -0
  24. package/dist/Entries-QLMtTYLX.mjs +713 -0
  25. package/dist/Find-BPR0uU-Z.mjs +229 -0
  26. package/dist/Find-BidEQJxT.js +1 -0
  27. package/dist/GlobalStyling-BLQ_1W2y.mjs +1588 -0
  28. package/dist/GlobalStyling-CnSlXkZc.js +25 -0
  29. package/dist/Overview-BDlBCUI_.js +1 -0
  30. package/dist/Overview-BH3NwvNX.mjs +26 -0
  31. package/dist/Overview-BLsZMHNW.mjs +178 -0
  32. package/dist/Overview-BNMZ9MUK.js +1 -0
  33. package/dist/Overview-BbvfH1u-.js +1 -0
  34. package/dist/Overview-CDN88OSM.mjs +190 -0
  35. package/dist/Overview-CEPodGCn.mjs +311 -0
  36. package/dist/Overview-CvquDPhB.js +1 -0
  37. package/dist/Overview-D54pjmI6.mjs +633 -0
  38. package/dist/Overview-D67UjG6n.mjs +947 -0
  39. package/dist/Overview-KT2Mgfh5.js +1 -0
  40. package/dist/Overview-T-lsy3UZ.js +1 -0
  41. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +1 -0
  42. package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +392 -0
  43. package/dist/TableView-CpO53xcX.js +111 -0
  44. package/dist/TableView-D9J5rUls.mjs +72921 -0
  45. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +1 -0
  46. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs +40 -0
  47. package/dist/View-DlHBZbFu.js +1 -0
  48. package/dist/View-Dv5QMrSn.mjs +25 -0
  49. package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  50. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  51. package/dist/agenda-B49oKGeh.mjs +706 -0
  52. package/dist/agenda-DipQ5IWP.js +1 -0
  53. package/dist/availability-C7q9tq6l.js +1 -0
  54. package/dist/availability-DeCkqiu8.mjs +613 -0
  55. package/dist/cms-core-modules.css +1 -1
  56. package/dist/countries-BTPvmrsb.mjs +4 -0
  57. package/dist/countries-CgZ081No.js +1 -0
  58. package/dist/exceptions-D3b18TiY.mjs +647 -0
  59. package/dist/exceptions-DJ9zWX3k.js +1 -0
  60. package/dist/floating-ui.dom-C82nbomj.js +1 -0
  61. package/dist/floating-ui.dom-ouSgPqty.mjs +1133 -0
  62. package/dist/google-CvtuJwgk.mjs +4 -0
  63. package/dist/google-D4N3gb01.js +1 -0
  64. package/dist/index--jjEzba7.mjs +24 -0
  65. package/dist/index-9HVlmvK3.js +1 -0
  66. package/dist/index-BEGU8Kme.mjs +12 -0
  67. package/dist/index-Bwi1mtkq.mjs +24 -0
  68. package/dist/index-BzuHN-r8.mjs +24 -0
  69. package/dist/index-CImCyE3L.mjs +24 -0
  70. package/dist/index-CKPshlZ8-BQiiP6r_.mjs +1264 -0
  71. package/dist/index-CKPshlZ8-CIz1tDwX.js +1 -0
  72. package/dist/index-CQiY-oTN.mjs +24 -0
  73. package/dist/index-CSxYBeVA.js +1 -0
  74. package/dist/index-CkiNvRzs.js +1 -0
  75. package/dist/index-Co4ON2Di.js +1 -0
  76. package/dist/index-CwqrAU-H.js +1 -0
  77. package/dist/index-Cz-baGax.js +1 -0
  78. package/dist/index-D2a6wEPh.js +1 -0
  79. package/dist/index-DFQGVHTs.js +1 -0
  80. package/dist/index-DI6mydpm.mjs +138 -0
  81. package/dist/index-DMoyoaks.mjs +22 -0
  82. package/dist/index-DT1wWnUk.mjs +24 -0
  83. package/dist/index-DUeFrD-B.js +1 -0
  84. package/dist/index-DsnoK4ia.mjs +579 -0
  85. package/dist/index-R2oUDsjx.js +1 -0
  86. package/dist/index-RLz1QPrf.mjs +203 -0
  87. package/dist/index-UtjLbLw-.js +1 -0
  88. package/dist/index-_mG-aU3Z.mjs +87 -0
  89. package/dist/index-_sQDF1pH.js +1 -0
  90. package/dist/index-ijdf0d9-.js +1 -0
  91. package/dist/index-klI238nT.mjs +24 -0
  92. package/dist/index.cjs.js +1 -330
  93. package/dist/index.mjs +287 -69051
  94. package/dist/interpolation-BNUjI7LH.js +1 -0
  95. package/dist/interpolation-BpGXqOz8.mjs +59 -0
  96. package/dist/payment-kTjsV0Jj.js +1 -0
  97. package/dist/payment-zpCM0LD-.mjs +981 -0
  98. package/dist/regular-C4_3YXqx.mjs +602 -0
  99. package/dist/regular-DFwPEbZO.js +1 -0
  100. package/dist/regular-slots-4ooEpICB.mjs +67 -0
  101. package/dist/regular-slots-BAVGbomI.js +1 -0
  102. package/dist/resources-MpQkSstv.mjs +563 -0
  103. package/dist/resources-iM28T3dD.js +1 -0
  104. package/dist/src/appointments/index.d.ts +4 -28
  105. package/dist/src/appointments/routes.d.ts +3 -9
  106. package/dist/src/content-manager/components/content-editor/ContentLayout.vue.d.ts +8 -0
  107. package/dist/src/content-manager/components/content-editor/NewSectionDialog.vue.d.ts +5 -1
  108. package/dist/src/content-manager/components/content-editor/tiptap-extensions/Card.d.ts +6 -0
  109. package/dist/src/content-manager/components/content-editor/tiptap-extensions/ScopedSelectAll.d.ts +7 -0
  110. package/dist/src/content-manager/components/content-editor/tiptap-menus/NewNodeView.vue.d.ts +16 -2
  111. package/dist/src/content-manager/components/content-editor/tiptap-menus/element-editor-views/CardMenu.vue.d.ts +13 -0
  112. package/dist/src/content-manager/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +14 -0
  113. package/dist/src/content-manager/components/styling/ButtonStyleDialog.vue.d.ts +7 -7
  114. package/dist/src/content-manager/components/styling/CardStyleDialog.vue.d.ts +24 -0
  115. package/dist/src/content-manager/index.d.ts +5 -147
  116. package/dist/src/content-manager/pages/GlobalStyling.vue.d.ts +46 -8
  117. package/dist/src/content-manager/routes.d.ts +4 -128
  118. package/dist/src/custom/index.d.ts +2 -2
  119. package/dist/src/custom/routes.d.ts +1 -1
  120. package/dist/src/mail-templates/index.d.ts +2 -30
  121. package/dist/src/mail-templates/routes.d.ts +1 -11
  122. package/dist/src/product-collections/index.d.ts +2 -30
  123. package/dist/src/product-collections/routes.d.ts +1 -11
  124. package/dist/src/products/index.d.ts +2 -30
  125. package/dist/src/products/routes.d.ts +1 -11
  126. package/dist/src/promo-codes/index.d.ts +2 -30
  127. package/dist/src/promo-codes/routes.d.ts +1 -11
  128. package/dist/src/shipping-options/index.d.ts +2 -30
  129. package/dist/src/shipping-options/routes.d.ts +1 -11
  130. package/dist/src/table/index.d.ts +2 -70
  131. package/dist/src/table/routes.d.ts +1 -51
  132. package/dist/utils-BVKy9S2J.mjs +29 -0
  133. package/dist/utils-D6CaKJbp.js +2 -0
  134. package/dist/vee-validate-zod-BPQyEfpF.js +1 -0
  135. package/dist/vee-validate-zod-IXkfh-6Q.mjs +4402 -0
  136. package/package.json +4 -4
@@ -0,0 +1,25 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),U=require("@oneclick.dev/cms-kit"),m=require("lucide-vue-next"),h={class:"grid py-4"},A={class:"grid grid-cols-2 gap-2 mb-6"},R={class:"relative"},L={class:"grid grid-cols-3 gap-2 mb-6"},_={class:"relative"},I={class:"relative"},M={class:"relative"},O={class:"grid grid-cols-1 gap-2 mb-6"},G={class:"relative"},J={class:"flex items-center space-x-2"},P={class:"flex items-center space-x-2"},H={class:"grid grid-cols-2 gap-2 mb-6"},j={key:0},q={class:"relative"},K={key:1},Q={class:"relative"},W={key:0,class:"bg-muted px-4 py-2 rounded-md text-sm"},X=e.defineComponent({__name:"SectionStyleDialog",props:{buttons:{type:Array,default:()=>[]}},emits:["add","edit","delete"],setup(S,{expose:F,emit:g}){const{confirm:b}=U.useConfirmation(),V=g,x=e.ref(!1),v=e.ref("create"),i=e.ref(null),d=e.ref(!1),t=e.reactive({name:"",rendering:"class",className:"",componentName:"",styles:{backgroundColor:"#FFFFFF",titleColor:"#000000",textColor:"#000000"}}),T=f=>{f?(v.value="edit",i.value=f.id,d.value=f.id==="DEFAULT",t.name=f.name||"",t.rendering=f.rendering||"class",t.className=f.className||"",t.componentName=f.componentName||"",t.styles.backgroundColor=f.styles.backgroundColor||"#FFFFFF",t.styles.titleColor=f.styles.titleColor||"#000000",t.styles.textColor=f.styles.textColor||"#000000"):(v.value="create",i.value=null,d.value=!1,t.name="",t.rendering="class",t.className="",t.componentName="",t.styles.backgroundColor="#FFFFFF",t.styles.titleColor="#000000",t.styles.textColor="#000000"),x.value=!0},B=()=>{V("add",t),x.value=!1},w=()=>{d.value&&(t.name="Default"),V("edit",{id:i.value,...t}),x.value=!1},D=async()=>{if(d.value)return;await b("Are you sure you want to delete this theme? This action cannot be undone.","Delete Theme","Delete")&&(V("delete",i.value),x.value=!1)},$=()=>{t.styles.backgroundColor="#FFFFFF",t.styles.titleColor="#000000",t.styles.textColor="#000000"};return F({openDialog:T}),(f,r)=>{const a=e.resolveComponent("DialogTitle"),o=e.resolveComponent("DialogDescription"),z=e.resolveComponent("DialogHeader"),k=e.resolveComponent("Label"),N=e.resolveComponent("Input"),p=e.resolveComponent("RadioGroupItem"),C=e.resolveComponent("RadioGroup"),E=e.resolveComponent("Button"),s=e.resolveComponent("DialogFooter"),l=e.resolveComponent("DialogScrollContent"),u=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(u,{open:x.value,"onUpdate:open":r[10]||(r[10]=c=>x.value=c)},{default:e.withCtx(()=>[e.createVNode(l,{class:"sm:max-w-2xl"},{default:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.value==="create"?"Add New Section Style":"Edit Section Style"),1)]),_:1}),e.createVNode(o,null,{default:e.withCtx(()=>[...r[11]||(r[11]=[e.createTextVNode(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ",-1)])]),_:1})]),_:1}),e.createElementVNode("div",h,[e.createElementVNode("div",A,[e.createElementVNode("div",null,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-theme-name"},{default:e.withCtx(()=>[...r[12]||(r[12]=[e.createTextVNode("Display name",-1)])]),_:1}),e.createElementVNode("div",R,[e.createVNode(N,{modelValue:t.name,"onUpdate:modelValue":r[0]||(r[0]=c=>t.name=c),id:"collection-theme-dialog-theme-name",disabled:d.value},null,8,["modelValue","disabled"])])])]),r[21]||(r[21]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Style Settings",-1)),e.createElementVNode("div",L,[e.createElementVNode("div",null,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-background-color"},{default:e.withCtx(()=>[...r[13]||(r[13]=[e.createTextVNode("Background color",-1)])]),_:1}),e.createElementVNode("div",_,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[1]||(r[1]=c=>t.styles.backgroundColor=c),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.backgroundColor]]),e.createVNode(N,{modelValue:t.styles.backgroundColor,"onUpdate:modelValue":r[2]||(r[2]=c=>t.styles.backgroundColor=c),class:"pl-12",id:"collection-theme-dialog-background-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-title-color"},{default:e.withCtx(()=>[...r[14]||(r[14]=[e.createTextVNode("Heading color",-1)])]),_:1}),e.createElementVNode("div",I,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[3]||(r[3]=c=>t.styles.titleColor=c),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.titleColor]]),e.createVNode(N,{modelValue:t.styles.titleColor,"onUpdate:modelValue":r[4]||(r[4]=c=>t.styles.titleColor=c),class:"pl-12",id:"collection-theme-dialog-title-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-text-color"},{default:e.withCtx(()=>[...r[15]||(r[15]=[e.createTextVNode("Body text color",-1)])]),_:1}),e.createElementVNode("div",M,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[5]||(r[5]=c=>t.styles.textColor=c),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.textColor]]),e.createVNode(N,{modelValue:t.styles.textColor,"onUpdate:modelValue":r[6]||(r[6]=c=>t.styles.textColor=c),class:"pl-12",id:"collection-theme-dialog-text-color"},null,8,["modelValue"])])])]),r[22]||(r[22]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Rendering Method",-1)),e.createElementVNode("div",O,[e.createElementVNode("div",null,[e.createElementVNode("div",G,[e.createVNode(k,{class:"mb-4 text-muted-foreground"},{default:e.withCtx(()=>[...r[16]||(r[16]=[e.createTextVNode("Choose how this section should be styled on your site:",-1)])]),_:1}),e.createVNode(C,{modelValue:t.rendering,"onUpdate:modelValue":r[7]||(r[7]=c=>t.rendering=c),"default-value":"class"},{default:e.withCtx(()=>[e.createElementVNode("div",J,[e.createVNode(p,{id:"collection-theme-dialog-render-class",value:"class"}),e.createVNode(k,{for:"collection-theme-dialog-render-class"},{default:e.withCtx(()=>[...r[17]||(r[17]=[e.createTextVNode("Use a CSS class",-1)])]),_:1})]),e.createElementVNode("div",P,[e.createVNode(p,{id:"collection-theme-dialog-render-component",value:"component"}),e.createVNode(k,{for:"collection-theme-dialog-render-component"},{default:e.withCtx(()=>[...r[18]||(r[18]=[e.createTextVNode("Custom component",-1)])]),_:1})])]),_:1},8,["modelValue"])])])]),e.createElementVNode("div",H,[t.rendering==="class"?(e.openBlock(),e.createElementBlock("div",j,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-class-name"},{default:e.withCtx(()=>[...r[19]||(r[19]=[e.createTextVNode("Class name",-1)])]),_:1}),e.createElementVNode("div",q,[e.createVNode(N,{modelValue:t.className,"onUpdate:modelValue":r[8]||(r[8]=c=>t.className=c),id:"collection-theme-dialog-class-name"},null,8,["modelValue"])])])):(e.openBlock(),e.createElementBlock("div",K,[e.createVNode(k,{class:"mb-2",for:"collection-theme-dialog-component-name"},{default:e.withCtx(()=>[...r[20]||(r[20]=[e.createTextVNode("Component name",-1)])]),_:1}),e.createElementVNode("div",Q,[e.createVNode(N,{modelValue:t.componentName,"onUpdate:modelValue":r[9]||(r[9]=c=>t.componentName=c),id:"collection-theme-dialog-component-name"},null,8,["modelValue"])])]))]),t.rendering==="class"?(e.openBlock(),e.createElementBlock("pre",W,"."+e.toDisplayString(t.className)+` {
2
+ background-color: `+e.toDisplayString(t.styles.backgroundColor)+`;
3
+ color: `+e.toDisplayString(t.styles.textColor)+`;
4
+
5
+ h1, h2, h3, h4, h5, h6 {
6
+ color: `+e.toDisplayString(t.styles.titleColor)+`;
7
+ }
8
+ }
9
+ `,1)):e.createCommentVNode("",!0)]),e.createVNode(s,null,{default:e.withCtx(()=>[v.value==="edit"&&!d.value?(e.openBlock(),e.createBlock(E,{key:0,variant:"destructive",class:"mr-auto",onClick:D},{default:e.withCtx(()=>[...r[23]||(r[23]=[e.createTextVNode(" Delete Style ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="edit"&&d.value?(e.openBlock(),e.createBlock(E,{key:1,variant:"outline",class:"mr-auto",onClick:$},{default:e.withCtx(()=>[...r[24]||(r[24]=[e.createTextVNode(" Reset to Default ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="create"?(e.openBlock(),e.createBlock(E,{key:2,type:"submit",onClick:B},{default:e.withCtx(()=>[...r[25]||(r[25]=[e.createTextVNode(" Add Style ",-1)])]),_:1})):(e.openBlock(),e.createBlock(E,{key:3,type:"submit",onClick:w},{default:e.withCtx(()=>[...r[26]||(r[26]=[e.createTextVNode(" Save Changes ",-1)])]),_:1}))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Y={class:"grid py-4"},Z={class:"grid grid-cols-2 gap-2 mb-6"},ee={class:"relative"},te={class:"grid grid-cols-3 gap-2 mb-6"},oe={class:"relative"},le={class:"relative"},se={class:"relative"},ne={class:"grid grid-cols-1 gap-2 mb-6"},re={class:"relative"},ae={class:"flex items-center space-x-2"},de={class:"flex items-center space-x-2"},ie={class:"grid grid-cols-2 gap-2 mb-6"},ce={key:0},ue={class:"relative"},me={key:1},pe={class:"relative"},ye={key:0,class:"bg-muted px-4 py-2 rounded-md text-sm"},xe=e.defineComponent({__name:"ButtonStyleDialog",props:{defaultBackground:{type:String,default:"#FFFFFF"}},emits:["add","edit","delete"],setup(S,{expose:F,emit:g}){const{confirm:b}=U.useConfirmation(),V=g,x=e.ref(!1),v=e.ref("create"),i=e.ref(null),d=e.ref(!1),t=e.reactive({name:"",rendering:"class",className:"",componentName:"",styles:{backgroundColor:"#FFFFFF",textColor:"#000000",borderColor:"#000000",buttonRoundness:"none",buttonStyle:"default"}}),T=a=>{a?(v.value="edit",i.value=a.id,d.value=a.id==="DEFAULT",t.name=a.name||"",t.rendering=a.rendering||"class",t.className=a.className||"",t.componentName=a.componentName||"",t.styles.backgroundColor=a.styles.backgroundColor||"#FFFFFF",t.styles.textColor=a.styles.textColor||"#000000",t.styles.borderColor=a.styles.borderColor||"#000000",t.styles.buttonRoundness=a.styles.buttonRoundness||"none",t.styles.buttonStyle=a.styles.buttonStyle||"default"):(v.value="create",i.value=null,d.value=!1,t.name="",t.rendering="class",t.className="",t.componentName="",t.styles.backgroundColor="#FFFFFF",t.styles.textColor="#000000",t.styles.borderColor="#000000",t.styles.buttonRoundness="none",t.styles.buttonStyle="default"),x.value=!0},B=()=>{V("add",t),x.value=!1},w=()=>{d.value&&(t.name="Default"),V("edit",{id:i.value,...t}),x.value=!1},D=async()=>{if(d.value)return;await b("Are you sure you want to delete this theme? This action cannot be undone.","Delete Theme","Delete")&&(V("delete",i.value),x.value=!1)},$=()=>{t.styles.backgroundColor="#FFFFFF",t.styles.textColor="#000000",t.styles.borderColor="#000000",t.styles.buttonRoundness="none",t.styles.buttonStyle="default"},f=a=>{switch(a){case"none":return 0;case"small":return 8;case"medium":return 12;case"pill":return 99;default:return 0}},r=e.computed(()=>{let a="."+t.className+` {
10
+ `;return a+=` background-color: ${t.styles.backgroundColor};
11
+ `,a+=` color: ${t.styles.textColor};
12
+ `,t.styles.buttonStyle==="outline"?a+=` border: 1px solid ${t.styles.borderColor};
13
+ `:t.styles.buttonStyle==="shadow"?a+=` box-shadow: 0 3px 6px #ccc;
14
+ `:t.styles.buttonStyle==="retro"&&(a+=` box-shadow: inset 0 0 0 2px ${t.styles.borderColor}, 2px 2px 0 ${t.styles.borderColor};
15
+ `),t.styles.buttonRoundness!=="none"&&(a+=` border-radius: ${f(t.styles.buttonRoundness)}px;
16
+ `),a+=`}
17
+ `,a});return F({openDialog:T}),(a,o)=>{const z=e.resolveComponent("DialogTitle"),k=e.resolveComponent("DialogDescription"),N=e.resolveComponent("DialogHeader"),p=e.resolveComponent("Label"),C=e.resolveComponent("Input"),E=e.resolveComponent("RadioGroupItem"),s=e.resolveComponent("RadioGroup"),l=e.resolveComponent("Button"),u=e.resolveComponent("DialogFooter"),c=e.resolveComponent("DialogScrollContent"),y=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(y,{open:x.value,"onUpdate:open":o[18]||(o[18]=n=>x.value=n)},{default:e.withCtx(()=>[e.createVNode(c,{class:"sm:max-w-2xl"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.value==="create"?"Add New Button Style":"Edit Button Style"),1)]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[...o[19]||(o[19]=[e.createTextVNode(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ",-1)])]),_:1})]),_:1}),e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-theme-name"},{default:e.withCtx(()=>[...o[20]||(o[20]=[e.createTextVNode("Display name",-1)])]),_:1}),e.createElementVNode("div",ee,[e.createVNode(C,{modelValue:t.name,"onUpdate:modelValue":o[0]||(o[0]=n=>t.name=n),id:"collection-theme-dialog-theme-name",disabled:d.value},null,8,["modelValue","disabled"])])])]),o[38]||(o[38]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Style Settings",-1)),e.createElementVNode("div",te,[e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-background-color"},{default:e.withCtx(()=>[...o[21]||(o[21]=[e.createTextVNode("Background color",-1)])]),_:1}),e.createElementVNode("div",oe,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=n=>t.styles.backgroundColor=n),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.backgroundColor]]),e.createVNode(C,{modelValue:t.styles.backgroundColor,"onUpdate:modelValue":o[2]||(o[2]=n=>t.styles.backgroundColor=n),class:"pl-12",id:"collection-theme-dialog-background-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-text-color"},{default:e.withCtx(()=>[...o[22]||(o[22]=[e.createTextVNode("Text color",-1)])]),_:1}),e.createElementVNode("div",le,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>t.styles.textColor=n),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.textColor]]),e.createVNode(C,{modelValue:t.styles.textColor,"onUpdate:modelValue":o[4]||(o[4]=n=>t.styles.textColor=n),class:"pl-12",id:"collection-theme-dialog-text-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-border-color"},{default:e.withCtx(()=>[...o[23]||(o[23]=[e.createTextVNode("Border color",-1)])]),_:1}),e.createElementVNode("div",se,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=n=>t.styles.borderColor=n),type:"color",label:"Primary Color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.borderColor]]),e.createVNode(C,{modelValue:t.styles.borderColor,"onUpdate:modelValue":o[6]||(o[6]=n=>t.styles.borderColor=n),class:"pl-12",id:"collection-theme-dialog-border-color"},null,8,["modelValue"])])])]),e.createElementVNode("div",{style:e.normalizeStyle(`--button-background-color: ${t.styles.backgroundColor}; --button-text-color: ${t.styles.textColor}`)},[e.createVNode(p,{class:"mb-4"},{default:e.withCtx(()=>[...o[24]||(o[24]=[e.createTextVNode("Shape",-1)])]),_:1}),e.createElementVNode("div",{class:"grid grid-cols-4 gap-4 mb-6 p-2 rounded",style:e.normalizeStyle({backgroundColor:S.defaultBackground})},[e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[7]||(o[7]=n=>t.styles.buttonRoundness="none")},[o[25]||(o[25]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)]"},"Button",-1)),t.styles.buttonRoundness!=="none"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[8]||(o[8]=n=>t.styles.buttonRoundness="small")},[o[26]||(o[26]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[8px]"},"Button",-1)),t.styles.buttonRoundness!=="small"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[9]||(o[9]=n=>t.styles.buttonRoundness="medium")},[o[27]||(o[27]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[12px]"},"Button",-1)),t.styles.buttonRoundness!=="medium"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[10]||(o[10]=n=>t.styles.buttonRoundness="pill")},[o[28]||(o[28]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[99px]"},"Button",-1)),t.styles.buttonRoundness!=="pill"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))])],4),e.createVNode(p,{class:"mb-4"},{default:e.withCtx(()=>[...o[29]||(o[29]=[e.createTextVNode("Style",-1)])]),_:1}),e.createElementVNode("div",{class:"grid grid-cols-4 gap-4 mb-6 p-2 rounded",style:e.normalizeStyle(`--button-border-radius: ${f(t.styles.buttonRoundness)}px; --button-border-color: ${t.styles.borderColor}; background-color: ${S.defaultBackground}`)},[e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[11]||(o[11]=n=>t.styles.buttonStyle="default")},[o[30]||(o[30]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]"},"Button",-1)),t.styles.buttonStyle!=="default"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[12]||(o[12]=n=>t.styles.buttonStyle="outline")},[o[31]||(o[31]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)] border border-[var(--button-border-color)]"}," Button ",-1)),t.styles.buttonStyle!=="outline"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[13]||(o[13]=n=>t.styles.buttonStyle="shadow")},[o[32]||(o[32]=e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]",style:{"box-shadow":"0 3px 6px #ccc"}}," Button ",-1)),t.styles.buttonStyle!=="shadow"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[14]||(o[14]=n=>t.styles.buttonStyle="retro")},[e.createElementVNode("div",{class:"text-center px-8 py-2 bg-[var(--button-background-color)] text-[var(--button-text-color)] rounded-[var(--button-border-radius)]",style:e.normalizeStyle(`box-shadow: inset 0 0 0 2px ${t.styles.borderColor}, 2px 2px 0 ${t.styles.borderColor};`)}," Button ",4),t.styles.buttonStyle!=="retro"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))])],4)],4),o[39]||(o[39]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Rendering Method",-1)),e.createElementVNode("div",ne,[e.createElementVNode("div",null,[e.createElementVNode("div",re,[e.createVNode(p,{class:"mb-4 text-muted-foreground"},{default:e.withCtx(()=>[...o[33]||(o[33]=[e.createTextVNode("Choose how this section should be styled on your site:",-1)])]),_:1}),e.createVNode(s,{modelValue:t.rendering,"onUpdate:modelValue":o[15]||(o[15]=n=>t.rendering=n),"default-value":"class"},{default:e.withCtx(()=>[e.createElementVNode("div",ae,[e.createVNode(E,{id:"collection-theme-dialog-render-class",value:"class"}),e.createVNode(p,{for:"collection-theme-dialog-render-class"},{default:e.withCtx(()=>[...o[34]||(o[34]=[e.createTextVNode("Use a CSS class",-1)])]),_:1})]),e.createElementVNode("div",de,[e.createVNode(E,{id:"collection-theme-dialog-render-component",value:"component"}),e.createVNode(p,{for:"collection-theme-dialog-render-component"},{default:e.withCtx(()=>[...o[35]||(o[35]=[e.createTextVNode("Custom component",-1)])]),_:1})])]),_:1},8,["modelValue"])])])]),e.createElementVNode("div",ie,[t.rendering==="class"?(e.openBlock(),e.createElementBlock("div",ce,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-class-name"},{default:e.withCtx(()=>[...o[36]||(o[36]=[e.createTextVNode("Class name",-1)])]),_:1}),e.createElementVNode("div",ue,[e.createVNode(C,{modelValue:t.className,"onUpdate:modelValue":o[16]||(o[16]=n=>t.className=n),id:"collection-theme-dialog-class-name"},null,8,["modelValue"])])])):(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-component-name"},{default:e.withCtx(()=>[...o[37]||(o[37]=[e.createTextVNode("Component name",-1)])]),_:1}),e.createElementVNode("div",pe,[e.createVNode(C,{modelValue:t.componentName,"onUpdate:modelValue":o[17]||(o[17]=n=>t.componentName=n),id:"collection-theme-dialog-component-name"},null,8,["modelValue"])])]))]),t.rendering==="class"?(e.openBlock(),e.createElementBlock("pre",ye,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)]),e.createVNode(u,null,{default:e.withCtx(()=>[v.value==="edit"&&!d.value?(e.openBlock(),e.createBlock(l,{key:0,variant:"destructive",class:"mr-auto",onClick:D},{default:e.withCtx(()=>[...o[40]||(o[40]=[e.createTextVNode(" Delete Style ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="edit"&&d.value?(e.openBlock(),e.createBlock(l,{key:1,variant:"outline",class:"mr-auto",onClick:$},{default:e.withCtx(()=>[...o[41]||(o[41]=[e.createTextVNode(" Reset to Default ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="create"?(e.openBlock(),e.createBlock(l,{key:2,type:"submit",onClick:B},{default:e.withCtx(()=>[...o[42]||(o[42]=[e.createTextVNode(" Add Style ",-1)])]),_:1})):(e.openBlock(),e.createBlock(l,{key:3,type:"submit",onClick:w},{default:e.withCtx(()=>[...o[43]||(o[43]=[e.createTextVNode(" Save Changes ",-1)])]),_:1}))]),_:1})]),_:1})]),_:1},8,["open"])}}}),ve={class:"grid py-4"},fe={class:"grid grid-cols-2 gap-2 mb-6"},ge={class:"relative"},be={class:"grid grid-cols-4 gap-2 mb-6"},Ce={class:"relative"},Ve={class:"relative"},ke={class:"relative"},Ne={class:"relative"},Ee={class:"grid grid-cols-1 gap-2 mb-6"},Be={class:"relative"},Te={class:"flex items-center space-x-2"},we={class:"flex items-center space-x-2"},De={class:"grid grid-cols-2 gap-2 mb-6"},Se={key:0},Fe={class:"relative"},$e={key:1},ze={class:"relative"},Ue={key:0,class:"bg-muted px-4 py-2 rounded-md text-sm"},he=e.defineComponent({__name:"CardStyleDialog",props:{defaultBackground:{type:String,default:"#FFFFFF"}},emits:["add","edit","delete"],setup(S,{expose:F,emit:g}){const{confirm:b}=U.useConfirmation(),V=g,x=e.ref(!1),v=e.ref("create"),i=e.ref(null),d=e.ref(!1),t=e.reactive({name:"",rendering:"class",className:"",componentName:"",styles:{backgroundColor:"#FFFFFF",titleColor:"#000000",textColor:"#000000",borderColor:"#000000",roundness:"none",style:"default"}}),T=a=>{a?(v.value="edit",i.value=a.id,d.value=a.id==="DEFAULT",t.name=a.name||"",t.rendering=a.rendering||"class",t.className=a.className||"",t.componentName=a.componentName||"",t.styles.backgroundColor=a.styles.backgroundColor||"#FFFFFF",t.styles.titleColor=a.styles.titleColor||"#000000",t.styles.textColor=a.styles.textColor||"#000000",t.styles.borderColor=a.styles.borderColor||"#000000",t.styles.roundness=a.styles.roundness||"none",t.styles.style=a.styles.style||"default"):(v.value="create",i.value=null,d.value=!1,t.name="",t.rendering="class",t.className="",t.componentName="",t.styles.backgroundColor="#FFFFFF",t.styles.titleColor="#000000",t.styles.textColor="#000000",t.styles.borderColor="#000000",t.styles.roundness="none",t.styles.style="default"),x.value=!0},B=()=>{V("add",t),x.value=!1},w=()=>{d.value&&(t.name="Default"),V("edit",{id:i.value,...t}),x.value=!1},D=async()=>{if(d.value)return;await b("Are you sure you want to delete this theme? This action cannot be undone.","Delete Theme","Delete")&&(V("delete",i.value),x.value=!1)},$=()=>{t.styles.backgroundColor="#FFFFFF",t.styles.titleColor="#000000",t.styles.textColor="#000000",t.styles.borderColor="#000000",t.styles.roundness="none",t.styles.style="default"},f=a=>{switch(a){case"none":return 0;case"small":return 8;case"medium":return 12;default:return 0}},r=e.computed(()=>{let a="."+t.className+` {
18
+ `;return a+=` background-color: ${t.styles.backgroundColor};
19
+ `,a+=` color: ${t.styles.textColor};
20
+ `,t.styles.style==="outline"?a+=` border: 1px solid ${t.styles.borderColor};
21
+ `:t.styles.style==="shadow"?a+=` box-shadow: 0 3px 6px #ccc;
22
+ `:t.styles.style==="retro"&&(a+=` box-shadow: inset 0 0 0 2px ${t.styles.borderColor}, 2px 2px 0 ${t.styles.borderColor};
23
+ `),t.styles.roundness!=="none"&&(a+=` border-radius: ${f(t.styles.roundness)}px;
24
+ `),a+=`}
25
+ `,a});return F({openDialog:T}),(a,o)=>{const z=e.resolveComponent("DialogTitle"),k=e.resolveComponent("DialogDescription"),N=e.resolveComponent("DialogHeader"),p=e.resolveComponent("Label"),C=e.resolveComponent("Input"),E=e.resolveComponent("RadioGroupItem"),s=e.resolveComponent("RadioGroup"),l=e.resolveComponent("Button"),u=e.resolveComponent("DialogFooter"),c=e.resolveComponent("DialogScrollContent"),y=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(y,{open:x.value,"onUpdate:open":o[19]||(o[19]=n=>x.value=n)},{default:e.withCtx(()=>[e.createVNode(c,{class:"sm:max-w-2xl"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.value==="create"?"Add New Card Style":"Edit Card Style"),1)]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[...o[20]||(o[20]=[e.createTextVNode(" These settings change how this section looks in the editor. To style your live site, add matching CSS or use a custom component. ",-1)])]),_:1})]),_:1}),e.createElementVNode("div",ve,[e.createElementVNode("div",fe,[e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-theme-name"},{default:e.withCtx(()=>[...o[21]||(o[21]=[e.createTextVNode("Display name",-1)])]),_:1}),e.createElementVNode("div",ge,[e.createVNode(C,{modelValue:t.name,"onUpdate:modelValue":o[0]||(o[0]=n=>t.name=n),id:"collection-theme-dialog-theme-name",disabled:d.value},null,8,["modelValue","disabled"])])])]),o[40]||(o[40]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Style Settings",-1)),e.createElementVNode("div",be,[e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-background-color"},{default:e.withCtx(()=>[...o[22]||(o[22]=[e.createTextVNode("Background color",-1)])]),_:1}),e.createElementVNode("div",Ce,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=n=>t.styles.backgroundColor=n),type:"color",label:"Background color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.backgroundColor]]),e.createVNode(C,{modelValue:t.styles.backgroundColor,"onUpdate:modelValue":o[2]||(o[2]=n=>t.styles.backgroundColor=n),class:"pl-12",id:"collection-theme-dialog-background-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-title-color"},{default:e.withCtx(()=>[...o[23]||(o[23]=[e.createTextVNode("Heading color",-1)])]),_:1}),e.createElementVNode("div",Ve,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>t.styles.titleColor=n),type:"color",label:"Heading color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.titleColor]]),e.createVNode(C,{modelValue:t.styles.titleColor,"onUpdate:modelValue":o[4]||(o[4]=n=>t.styles.titleColor=n),class:"pl-12",id:"collection-theme-dialog-title-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-text-color"},{default:e.withCtx(()=>[...o[24]||(o[24]=[e.createTextVNode("Text color",-1)])]),_:1}),e.createElementVNode("div",ke,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[5]||(o[5]=n=>t.styles.textColor=n),type:"color",label:"Text color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.textColor]]),e.createVNode(C,{modelValue:t.styles.textColor,"onUpdate:modelValue":o[6]||(o[6]=n=>t.styles.textColor=n),class:"pl-12",id:"collection-theme-dialog-text-color"},null,8,["modelValue"])])]),e.createElementVNode("div",null,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-border-color"},{default:e.withCtx(()=>[...o[25]||(o[25]=[e.createTextVNode("Border color",-1)])]),_:1}),e.createElementVNode("div",Ne,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[7]||(o[7]=n=>t.styles.borderColor=n),type:"color",label:"Border color",class:"absolute top-0.5 left-1 size-8"},null,512),[[e.vModelText,t.styles.borderColor]]),e.createVNode(C,{modelValue:t.styles.borderColor,"onUpdate:modelValue":o[8]||(o[8]=n=>t.styles.borderColor=n),class:"pl-12",id:"collection-theme-dialog-border-color"},null,8,["modelValue"])])])]),e.createElementVNode("div",{style:e.normalizeStyle(`--card-background-color: ${t.styles.backgroundColor}; --card-title-color: ${t.styles.titleColor}; --card-text-color: ${t.styles.textColor}`)},[e.createVNode(p,{class:"mb-4"},{default:e.withCtx(()=>[...o[26]||(o[26]=[e.createTextVNode("Shape",-1)])]),_:1}),e.createElementVNode("div",{class:"grid grid-cols-3 gap-4 mb-6 p-2 rounded",style:e.normalizeStyle({backgroundColor:S.defaultBackground})},[e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[9]||(o[9]=n=>t.styles.roundness="none")},[o[27]||(o[27]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.roundness!=="none"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[10]||(o[10]=n=>t.styles.roundness="small")},[o[28]||(o[28]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[8px]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.roundness!=="small"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[11]||(o[11]=n=>t.styles.roundness="medium")},[o[29]||(o[29]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[12px]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.roundness!=="medium"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))])],4),e.createVNode(p,{class:"mb-4"},{default:e.withCtx(()=>[...o[30]||(o[30]=[e.createTextVNode("Style",-1)])]),_:1}),e.createElementVNode("div",{class:"grid grid-cols-4 gap-4 mb-6 p-2 rounded",style:e.normalizeStyle(`--card-border-radius: ${f(t.styles.roundness)}px; --card-border-color: ${t.styles.borderColor}; background-color: ${S.defaultBackground}`)},[e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[12]||(o[12]=n=>t.styles.style="default")},[o[31]||(o[31]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.style!=="default"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[13]||(o[13]=n=>t.styles.style="outline")},[o[32]||(o[32]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)] border border-[var(--card-border-color)]"},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.style!=="outline"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[14]||(o[14]=n=>t.styles.style="shadow")},[o[33]||(o[33]=e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]",style:{"box-shadow":"0 3px 6px #ccc"}},[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card"),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.")],-1)),t.styles.style!=="shadow"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))]),e.createElementVNode("div",{class:"flex flex-col gap-2 items-center cursor-pointer",onClick:o[15]||(o[15]=n=>t.styles.style="retro")},[e.createElementVNode("div",{class:"text-center px-8 py-4 bg-[var(--card-background-color)] rounded-[var(--card-border-radius)]",style:e.normalizeStyle(`box-shadow: inset 0 0 0 2px ${t.styles.borderColor}, 2px 2px 0 ${t.styles.borderColor};`)},[...o[34]||(o[34]=[e.createElementVNode("strong",{class:"text-2xl text-[var(--card-title-color)]"},"Card",-1),e.createElementVNode("p",{class:"text-[var(--card-text-color)]"},"Lorem ipsum dolor sit amet.",-1)])],4),t.styles.style!=="retro"?(e.openBlock(),e.createBlock(e.unref(m.Circle),{key:0,class:"size-4 text-black/30"})):(e.openBlock(),e.createBlock(e.unref(m.CircleCheckBig),{key:1,class:"size-4 text-black"}))])],4)],4),o[41]||(o[41]=e.createElementVNode("h2",{class:"font-semibold mb-4"},"Rendering Method",-1)),e.createElementVNode("div",Ee,[e.createElementVNode("div",null,[e.createElementVNode("div",Be,[e.createVNode(p,{class:"mb-4 text-muted-foreground"},{default:e.withCtx(()=>[...o[35]||(o[35]=[e.createTextVNode("Choose how this section should be styled on your site:",-1)])]),_:1}),e.createVNode(s,{modelValue:t.rendering,"onUpdate:modelValue":o[16]||(o[16]=n=>t.rendering=n),"default-value":"class"},{default:e.withCtx(()=>[e.createElementVNode("div",Te,[e.createVNode(E,{id:"collection-theme-dialog-render-class",value:"class"}),e.createVNode(p,{for:"collection-theme-dialog-render-class"},{default:e.withCtx(()=>[...o[36]||(o[36]=[e.createTextVNode("Use a CSS class",-1)])]),_:1})]),e.createElementVNode("div",we,[e.createVNode(E,{id:"collection-theme-dialog-render-component",value:"component"}),e.createVNode(p,{for:"collection-theme-dialog-render-component"},{default:e.withCtx(()=>[...o[37]||(o[37]=[e.createTextVNode("Custom component",-1)])]),_:1})])]),_:1},8,["modelValue"])])])]),e.createElementVNode("div",De,[t.rendering==="class"?(e.openBlock(),e.createElementBlock("div",Se,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-class-name"},{default:e.withCtx(()=>[...o[38]||(o[38]=[e.createTextVNode("Class name",-1)])]),_:1}),e.createElementVNode("div",Fe,[e.createVNode(C,{modelValue:t.className,"onUpdate:modelValue":o[17]||(o[17]=n=>t.className=n),id:"collection-theme-dialog-class-name"},null,8,["modelValue"])])])):(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(p,{class:"mb-2",for:"collection-theme-dialog-component-name"},{default:e.withCtx(()=>[...o[39]||(o[39]=[e.createTextVNode("Component name",-1)])]),_:1}),e.createElementVNode("div",ze,[e.createVNode(C,{modelValue:t.componentName,"onUpdate:modelValue":o[18]||(o[18]=n=>t.componentName=n),id:"collection-theme-dialog-component-name"},null,8,["modelValue"])])]))]),t.rendering==="class"?(e.openBlock(),e.createElementBlock("pre",Ue,e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)]),e.createVNode(u,null,{default:e.withCtx(()=>[v.value==="edit"&&!d.value?(e.openBlock(),e.createBlock(l,{key:0,variant:"destructive",class:"mr-auto",onClick:D},{default:e.withCtx(()=>[...o[42]||(o[42]=[e.createTextVNode(" Delete Style ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="edit"&&d.value?(e.openBlock(),e.createBlock(l,{key:1,variant:"outline",class:"mr-auto",onClick:$},{default:e.withCtx(()=>[...o[43]||(o[43]=[e.createTextVNode(" Reset to Default ",-1)])]),_:1})):e.createCommentVNode("",!0),v.value==="create"?(e.openBlock(),e.createBlock(l,{key:2,type:"submit",onClick:B},{default:e.withCtx(()=>[...o[44]||(o[44]=[e.createTextVNode(" Add Style ",-1)])]),_:1})):(e.openBlock(),e.createBlock(l,{key:3,type:"submit",onClick:w},{default:e.withCtx(()=>[...o[45]||(o[45]=[e.createTextVNode(" Save Changes ",-1)])]),_:1}))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Ae={class:"w-full"},Re={class:"flex items-center justify-between gap-4 w-full my-4"},Le={key:0,class:"flex gap-4 flex-wrap mb-8"},_e=["onClick"],Ie={class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},Me={key:1,class:"flex gap-4 flex-wrap mb-8"},Oe={key:2,class:"flex gap-4 flex-wrap mb-8"},Ge=["onClick"],Je={class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},Pe={key:3,class:"flex gap-4 flex-wrap mb-8"},He={key:4,class:"flex gap-4 flex-wrap mb-8"},je=["onClick"],qe={class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},Ke={key:5,class:"flex gap-4 flex-wrap mb-8"},Qe=e.defineComponent({__name:"GlobalStyling",setup(S){const{navigateTo:F}=U.useModuleRoute(),{getModuleData:g,setModuleData:b}=U.useModuleStorage();U.useModuleBreadcrumbs(()=>[{text:"Global Styling"}]);const V=e.ref(""),x=e.ref(""),v=e.ref(""),i=e.ref(null),d=e.ref(null),t=e.ref(null),T=e.computed(()=>i.value===null?null:i.value&&i.value.find(s=>s.id==="DEFAULT")?i.value:[{id:"DEFAULT",name:"Default",className:"",styles:{backgroundColor:"#FFFFFF",textColor:"#000000"}},...i.value]),B=e.computed(()=>T.value?.find(s=>s.id==="DEFAULT")?.styles.backgroundColor??"#FFFFFF"),w=e.computed(()=>d.value===null?null:d.value&&d.value.find(s=>s.id==="DEFAULT")?d.value:[{id:"DEFAULT",name:"Default",className:"",styles:{backgroundColor:"#FFFFFF",textColor:"#000000"}},...d.value]),D=e.computed(()=>t.value===null?null:t.value&&t.value.find(s=>s.id==="DEFAULT")?t.value:[{id:"DEFAULT",name:"Default",className:"",styles:{backgroundColor:"#FFFFFF",textColor:"#000000"}},...t.value]);async function $(s){let l=JSON.parse(JSON.stringify(s)),u=crypto.randomUUID();l.id=u,i.value.push(l),i.value=await g("sectionThemes")||[],i.value.push(l),b("sectionThemes",i.value)}async function f(s){let l=JSON.parse(JSON.stringify(s)),u=i.value.findIndex(c=>c.id===l.id);u!==-1?i.value[u]=l:l.id==="DEFAULT"&&(Array.isArray(i.value)||(i.value=[]),i.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...i.value]),i.value=await g("sectionThemes")||[],u=i.value.findIndex(c=>c.id===l.id),u!==-1?(i.value[u]=l,b("sectionThemes",i.value)):l.id==="DEFAULT"&&(Array.isArray(i.value)||(i.value=[]),i.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...i.value],b("sectionThemes",i.value))}async function r(s){i.value=i.value.filter(l=>l.id!==s),i.value=await g("sectionThemes")||[],i.value=i.value.filter(l=>l.id!==s),b("sectionThemes",i.value)}async function a(s){let l=JSON.parse(JSON.stringify(s)),u=crypto.randomUUID();l.id=u,d.value.push(l),d.value=await g("buttonThemes")||[],d.value.push(l),b("buttonThemes",d.value)}async function o(s){let l=JSON.parse(JSON.stringify(s)),u=d.value.findIndex(c=>c.id===l.id);u!==-1?d.value[u]=l:l.id==="DEFAULT"&&(Array.isArray(d.value)||(d.value=[]),d.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...d.value]),d.value=await g("buttonThemes")||[],u=d.value.findIndex(c=>c.id===l.id),u!==-1?(d.value[u]=l,b("buttonThemes",d.value)):l.id==="DEFAULT"&&(Array.isArray(d.value)||(d.value=[]),d.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...d.value],b("buttonThemes",d.value))}async function z(s){d.value=d.value.filter(l=>l.id!==s),d.value=await g("buttonThemes")||[],d.value=d.value.filter(l=>l.id!==s),b("buttonThemes",d.value)}const k=function(s){let l={};if(l.backgroundColor=s.styles.backgroundColor,l.color=s.styles.textColor,s.styles.buttonStyle==="outline"?l.border=`1px solid ${s.styles.borderColor}`:s.styles.buttonStyle==="shadow"?l.boxShadow="0 3px 6px #ccc":s.styles.buttonStyle==="retro"&&(l.boxShadow=`inset 0 0 0 2px ${s.styles.borderColor}, 2px 2px 0 ${s.styles.borderColor}`),s.styles.buttonRoundness!=="none"){let u=0;s.styles.buttonRoundness==="small"?u=4:s.styles.buttonRoundness==="medium"?u=8:s.styles.buttonRoundness==="pill"&&(u=9999),l.borderRadius=`${u}px`}return l};async function N(s){let l=JSON.parse(JSON.stringify(s)),u=crypto.randomUUID();l.id=u,t.value.push(l),t.value=await g("cardThemes")||[],t.value.push(l),b("cardThemes",t.value)}async function p(s){let l=JSON.parse(JSON.stringify(s)),u=t.value.findIndex(c=>c.id===l.id);u!==-1?t.value[u]=l:l.id==="DEFAULT"&&(Array.isArray(t.value)||(t.value=[]),t.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...t.value]),t.value=await g("cardThemes")||[],u=t.value.findIndex(c=>c.id===l.id),u!==-1?(t.value[u]=l,b("cardThemes",t.value)):l.id==="DEFAULT"&&(Array.isArray(t.value)||(t.value=[]),t.value=[{id:"DEFAULT",name:"Default",styles:l.styles},...t.value],b("cardThemes",t.value))}async function C(s){t.value=t.value.filter(l=>l.id!==s),t.value=await g("cardThemes")||[],t.value=t.value.filter(l=>l.id!==s),b("cardThemes",t.value)}const E=function(s){let l={};if(l.backgroundColor=s.styles.backgroundColor,l.color=s.styles.textColor,s.styles.style==="outline"?l.border=`1px solid ${s.styles.borderColor}`:s.styles.style==="shadow"?l.boxShadow="0 3px 6px #ccc":s.styles.style==="retro"&&(l.boxShadow=`inset 0 0 0 2px ${s.styles.borderColor}, 2px 2px 0 ${s.styles.borderColor}`),s.styles.roundness!=="none"){let u=0;s.styles.roundness==="small"?u=4:s.styles.roundness==="medium"&&(u=8),l.borderRadius=`${u}px`}return l};return e.onMounted(()=>{g("sectionThemes").then(s=>{i.value=s||[]}),g("buttonThemes").then(s=>{d.value=s||[]}),g("cardThemes").then(s=>{t.value=s||[]})}),(s,l)=>{const u=e.resolveComponent("Button"),c=e.resolveComponent("Skeleton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ae,[e.createElementVNode("div",Re,[e.createVNode(u,{onClick:l[0]||(l[0]=y=>e.unref(F)("/")),variant:"link",class:"!pl-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.ChevronLeft),{class:"size-4"}),l[4]||(l[4]=e.createTextVNode(" Collections ",-1))]),_:1})]),l[10]||(l[10]=e.createElementVNode("h1",{class:"text-3xl mb-8"},"Global Styling",-1)),l[11]||(l[11]=e.createElementVNode("h3",{class:"text-2xl mb-2"},"Section Variants",-1)),l[12]||(l[12]=e.createElementVNode("p",{class:"mb-6 max-w-3xl text-muted-foreground"}," Set up the default design variants for your sections. These styles will be available across all collections by default, but you can choose to disable them within individual collections if needed. ",-1)),T.value!==null?(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",{class:"group/item flex flex-col gap-2 items-center",onClick:l[1]||(l[1]=y=>V.value.openDialog())},[e.createVNode(u,{variant:"outline",class:"size-44 border-dotted",tabindex:"-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-14"})]),_:1}),l[5]||(l[5]=e.createElementVNode("p",{class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},"New Style",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,y=>(e.openBlock(),e.createElementBlock("div",{class:"group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",key:y.id,onClick:n=>V.value.openDialog(y)},[e.createElementVNode("div",{class:"flex flex-col items-start rounded-md p-4 size-44",style:e.normalizeStyle({backgroundColor:y.styles.backgroundColor,border:"1px solid #E5E7EB"})},[e.createElementVNode("strong",{class:"text-2xl",style:e.normalizeStyle({color:y.styles.titleColor})},"Title",4),e.createElementVNode("p",{class:"mb-1",style:e.normalizeStyle({color:y.styles.textColor})},[...l[6]||(l[6]=[e.createTextVNode("Lorem ipsum dolor",-1),e.createElementVNode("br",null,null,-1),e.createTextVNode("sit amet.",-1)])],4),y.className?(e.openBlock(),e.createElementBlock("p",{key:0,class:"px-3 py-1.5 rounded-[99px]",style:e.normalizeStyle({backgroundColor:y.styles.textColor,color:y.styles.backgroundColor})},"."+e.toDisplayString(y.className),5)):e.createCommentVNode("",!0)],4),e.createElementVNode("p",Ie,e.toDisplayString(y.name),1)],8,_e))),128))])):(e.openBlock(),e.createElementBlock("div",Me,[e.createVNode(c,{class:"size-44 rounded-md"}),e.createVNode(c,{class:"size-44 rounded-md"})])),l[13]||(l[13]=e.createElementVNode("h3",{class:"text-2xl mb-2"},"Button Variants",-1)),l[14]||(l[14]=e.createElementVNode("p",{class:"mb-6 max-w-3xl text-muted-foreground"}," Define your standard button styles here. Collections can inherit these defaults or customize their own variants for more tailored experiences. ",-1)),w.value!==null?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",{class:"group/item flex flex-col gap-2 items-center",onClick:l[2]||(l[2]=y=>x.value.openDialog())},[e.createVNode(u,{variant:"outline",class:"size-44 border-dotted",tabindex:"-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-14"})]),_:1}),l[7]||(l[7]=e.createElementVNode("p",{class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},"New Style",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,y=>(e.openBlock(),e.createElementBlock("div",{class:"group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",key:y.id,onClick:n=>x.value.openDialog(y)},[e.createElementVNode("div",{class:"flex flex-col items-center justify-center rounded-md p-4 size-44",style:e.normalizeStyle({backgroundColor:B.value})},[e.createElementVNode("div",{style:e.normalizeStyle(k(y)),class:"px-4 py-2"}," Button ",4)],4),e.createElementVNode("p",Je,e.toDisplayString(y.name),1)],8,Ge))),128))])):(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(c,{class:"size-44 rounded-md"}),e.createVNode(c,{class:"size-44 rounded-md"})])),l[15]||(l[15]=e.createElementVNode("h3",{class:"text-2xl mb-2"},"Card Variants",-1)),l[16]||(l[16]=e.createElementVNode("p",{class:"mb-6 max-w-3xl text-muted-foreground"}," Define your standard card styles here. Collections can inherit these defaults or customize their own variants for more tailored experiences. ",-1)),D.value!==null?(e.openBlock(),e.createElementBlock("div",He,[e.createElementVNode("div",{class:"group/item flex flex-col gap-2 items-center",onClick:l[3]||(l[3]=y=>v.value.openDialog())},[e.createVNode(u,{variant:"outline",class:"size-44 border-dotted",tabindex:"-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-14"})]),_:1}),l[8]||(l[8]=e.createElementVNode("p",{class:"text-muted-foreground group-hover/item:text-white transition-colors duration-300"},"New Style",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,y=>(e.openBlock(),e.createElementBlock("div",{class:"group/item flex flex-col gap-2 text-black items-center cursor-pointer hover:brightness-105 transition-all duration-300",key:y.id,onClick:n=>v.value.openDialog(y)},[e.createElementVNode("div",{class:"flex flex-col items-center justify-center rounded-md p-4 size-44",style:e.normalizeStyle({backgroundColor:B.value})},[e.createElementVNode("div",{style:e.normalizeStyle(E(y)),class:"p-4"},[e.createElementVNode("strong",{class:"text-2xl",style:e.normalizeStyle({color:y.styles.titleColor})},"Card",4),l[9]||(l[9]=e.createElementVNode("p",null,"Lorem ipsum dolor sit amet.",-1))],4)],4),e.createElementVNode("p",qe,e.toDisplayString(y.name),1)],8,je))),128))])):(e.openBlock(),e.createElementBlock("div",Ke,[e.createVNode(c,{class:"size-44 rounded-md"}),e.createVNode(c,{class:"size-44 rounded-md"})]))]),e.createVNode(X,{ref_key:"sectionStyleDialog",ref:V,onAdd:$,onEdit:f,onDelete:r},null,512),e.createVNode(xe,{ref_key:"buttonStyleDialog",ref:x,defaultBackground:B.value,onAdd:a,onEdit:o,onDelete:z},null,8,["defaultBackground"]),e.createVNode(he,{ref_key:"cardStyleDialog",ref:v,defaultBackground:B.value,onAdd:N,onEdit:p,onDelete:C},null,8,["defaultBackground"])],64)}}});exports.default=Qe;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("@oneclick.dev/cms-kit"),o=require("./TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js"),s={class:"relative"},i=e.defineComponent({__name:"Overview",props:{config:{type:Object,required:!0}},setup(r){const c=r;t.useModuleBreadcrumbs(()=>[]),t.useFirebaseIntegration(c.config.project);const n=async()=>{};return e.onMounted(()=>{n()}),(u,a)=>(e.openBlock(),e.createElementBlock("div",s,[e.createVNode(o._sfc_main)]))}});exports.default=i;
@@ -0,0 +1,26 @@
1
+ import { defineComponent as r, onMounted as n, createElementBlock as c, openBlock as s, createVNode as a } from "vue";
2
+ import { useModuleBreadcrumbs as i, useFirebaseIntegration as p } from "@oneclick.dev/cms-kit";
3
+ import { _ as m } from "./TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs";
4
+ const u = { class: "relative" }, v = /* @__PURE__ */ r({
5
+ __name: "Overview",
6
+ props: {
7
+ config: {
8
+ type: Object,
9
+ required: !0
10
+ }
11
+ },
12
+ setup(e) {
13
+ const t = e;
14
+ i(() => []), p(t.config.project);
15
+ const o = async () => {
16
+ };
17
+ return n(() => {
18
+ o();
19
+ }), (_, d) => (s(), c("div", u, [
20
+ a(m)
21
+ ]));
22
+ }
23
+ });
24
+ export {
25
+ v as default
26
+ };
@@ -0,0 +1,178 @@
1
+ import { defineComponent as B, resolveComponent as i, createBlock as x, openBlock as a, withCtx as n, createVNode as e, createTextVNode as _, createElementBlock as f, Fragment as O, renderList as P, unref as c, createElementVNode as o, toDisplayString as g, createCommentVNode as y, ref as E, onMounted as N, withKeys as j } from "vue";
2
+ import { Pencil as z, Search as H, Plus as M } from "lucide-vue-next";
3
+ import { useModuleRoute as $, useModulePermissions as V, useLogs as R, useModuleBreadcrumbs as F, useFirebaseIntegration as I } from "@oneclick.dev/cms-kit";
4
+ import { r as L } from "./countries-BTPvmrsb.mjs";
5
+ const Q = { class: "flex items-center gap-2" }, S = { class: "flex items-center gap-2" }, q = { key: 0 }, A = { key: 1 }, K = { key: 2 }, D = { class: "flex items-center gap-2" }, U = /* @__PURE__ */ B({
6
+ __name: "ListView",
7
+ props: {
8
+ options: {
9
+ type: Array,
10
+ required: !0
11
+ }
12
+ },
13
+ setup(h) {
14
+ const { navigateTo: d } = $(), { hasPermission: C } = V();
15
+ return (k, l) => {
16
+ const p = i("TableHead"), b = i("TableRow"), w = i("TableHeader"), r = i("TableCell"), T = i("Button"), u = i("TableBody"), s = i("Table");
17
+ return a(), x(s, null, {
18
+ default: n(() => [
19
+ e(w, null, {
20
+ default: n(() => [
21
+ e(b, null, {
22
+ default: n(() => [
23
+ e(p, null, {
24
+ default: n(() => [...l[0] || (l[0] = [
25
+ _("Name", -1)
26
+ ])]),
27
+ _: 1
28
+ }),
29
+ e(p, null, {
30
+ default: n(() => [...l[1] || (l[1] = [
31
+ _("Countries", -1)
32
+ ])]),
33
+ _: 1
34
+ }),
35
+ e(p, null, {
36
+ default: n(() => [...l[2] || (l[2] = [
37
+ _("Price", -1)
38
+ ])]),
39
+ _: 1
40
+ }),
41
+ e(p, null, {
42
+ default: n(() => [...l[3] || (l[3] = [
43
+ _("Actions", -1)
44
+ ])]),
45
+ _: 1
46
+ })
47
+ ]),
48
+ _: 1
49
+ })
50
+ ]),
51
+ _: 1
52
+ }),
53
+ e(u, null, {
54
+ default: n(() => [
55
+ (a(!0), f(O, null, P(h.options, (t) => (a(), x(b, {
56
+ key: t.id,
57
+ onClick: (v) => c(d)(t.id),
58
+ class: "cursor-pointer"
59
+ }, {
60
+ default: n(() => [
61
+ e(r, { class: "font-medium" }, {
62
+ default: n(() => [
63
+ o("div", Q, [
64
+ o("span", null, g(t.title), 1)
65
+ ])
66
+ ]),
67
+ _: 2
68
+ }, 1024),
69
+ e(r, null, {
70
+ default: n(() => [
71
+ o("div", S, [
72
+ !t.countries || t.countries.length === 0 ? (a(), f("span", q, "Everywhere")) : y("", !0),
73
+ t.countries && t.countries.length < 3 ? (a(), f("span", A, g(t.countries.map((v) => c(L).find((m) => m.cca2 === v)?.name.common).join(", ")), 1)) : y("", !0),
74
+ t.countries && t.countries.length >= 3 ? (a(), f("span", K, g(t.countries.length) + " countries", 1)) : y("", !0)
75
+ ])
76
+ ]),
77
+ _: 2
78
+ }, 1024),
79
+ e(r, null, {
80
+ default: n(() => [
81
+ o("div", D, [
82
+ o("span", null, g(t.price || "FREE"), 1)
83
+ ])
84
+ ]),
85
+ _: 2
86
+ }, 1024),
87
+ e(r, null, {
88
+ default: n(() => [
89
+ e(T, {
90
+ variant: "ghost",
91
+ size: "icon"
92
+ }, {
93
+ default: n(() => [
94
+ e(c(z), { class: "size-4" })
95
+ ]),
96
+ _: 1
97
+ })
98
+ ]),
99
+ _: 1
100
+ })
101
+ ]),
102
+ _: 2
103
+ }, 1032, ["onClick"]))), 128))
104
+ ]),
105
+ _: 1
106
+ })
107
+ ]),
108
+ _: 1
109
+ });
110
+ };
111
+ }
112
+ }), W = { class: "relative" }, G = {
113
+ ref: "container",
114
+ class: "flex items-center justify-between gap-4 w-full mt-12 mb-8"
115
+ }, J = { class: "flex items-center gap-4" }, X = { class: "text-lg whitespace-nowrap" }, Y = { class: "relative w-full max-w-sm items-center" }, Z = { class: "absolute start-0 inset-y-0 flex items-center justify-center px-2" }, ee = { class: "flex items-center gap-4" }, le = /* @__PURE__ */ B({
116
+ __name: "Overview",
117
+ props: {
118
+ config: {
119
+ type: Object,
120
+ required: !0
121
+ }
122
+ },
123
+ setup(h) {
124
+ const d = h, { hasPermission: C } = V(), { navigateTo: k } = $(), { log: l, logWarning: p, logError: b } = R();
125
+ F(() => []);
126
+ const w = I(d.config.project), r = E([]), T = async () => {
127
+ const u = async () => {
128
+ if (!d.config.shippingOptionsCollection) return [];
129
+ const s = d.config.shippingOptionsCollection.split(":");
130
+ return s.length !== 2 ? [] : (await w.get(s[0]))?.[s[1]] || [];
131
+ };
132
+ return r.value = await u(), r.value;
133
+ };
134
+ return N(() => {
135
+ T();
136
+ }), (u, s) => {
137
+ const t = i("Input"), v = i("Button");
138
+ return a(), f("div", W, [
139
+ o("div", G, [
140
+ o("div", J, [
141
+ o("p", X, g(r.value?.length) + " options", 1),
142
+ o("div", Y, [
143
+ e(t, {
144
+ id: "search",
145
+ type: "text",
146
+ placeholder: "Search...",
147
+ class: "pl-8",
148
+ modelValue: u.searchQuery,
149
+ "onUpdate:modelValue": s[0] || (s[0] = (m) => u.searchQuery = m),
150
+ onKeydown: s[1] || (s[1] = j((m) => u.searchQuery = "", ["escape"]))
151
+ }, null, 8, ["modelValue"]),
152
+ o("span", Z, [
153
+ e(c(H), { class: "size-4 text-muted-foreground" })
154
+ ])
155
+ ])
156
+ ]),
157
+ o("div", ee, [
158
+ c(C)("create-option") ? (a(), x(v, {
159
+ key: 0,
160
+ variant: "outline",
161
+ onClick: s[2] || (s[2] = (m) => c(k)("new"))
162
+ }, {
163
+ default: n(() => [
164
+ e(c(M), { class: "size-4" }),
165
+ s[3] || (s[3] = _(" New Option ", -1))
166
+ ]),
167
+ _: 1
168
+ })) : y("", !0)
169
+ ])
170
+ ], 512),
171
+ e(U, { options: r.value }, null, 8, ["options"])
172
+ ]);
173
+ };
174
+ }
175
+ });
176
+ export {
177
+ le as default
178
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("lucide-vue-next"),h=require("@oneclick.dev/cms-kit"),F=require("./index-DUeFrD-B.js"),U=require("./utils-D6CaKJbp.js"),B=require("./index-ijdf0d9-.js"),Z={class:"grid @md:grid-cols-2 @2xl:grid-cols-3 @3xl:grid-cols-4 @4xl:grid-cols-5 @5xl:grid-cols-6 gap-6"},ee=["onClick","onContextmenu"],te=["src"],oe={class:"font-semibold"},ne={class:"text-sm text-muted-foreground flex items-center gap-2"},le={class:"flex items-center gap-2"},re={key:0},se=e.defineComponent({__name:"GridView",props:{products:{type:Array,required:!0}},setup(g){const o=e.inject("selection"),{navigateTo:m}=h.useModuleRoute(),{hasPermission:V}=h.useModulePermissions(),C=(s,l)=>{const f=l.ctrlKey||l.metaKey;if(l.shiftKey)console.log("range");else if(f||o.value.length>0){const r=o.value.indexOf(s.id);r>-1?o.value.splice(r,1):o.value.push(s.id)}else o.value=[],m(s.id)},n=s=>{s.target.closest(".GRID_ITEM")||(o.value=[])},d=(s,l)=>{l.ctrlKey||l.metaKey?o.value.includes(s.id)?o.value.splice(o.value.indexOf(s.id),1):o.value.push(s.id):o.value.includes(s.id)||(o.value=[s.id])};return(s,l)=>(e.openBlock(),e.createElementBlock("div",{class:"@container mb-4 flex-1 select-none",onClick:l[0]||(l[0]=f=>o.value=[]),onContextmenu:n},[e.createElementVNode("div",Z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.products,f=>(e.openBlock(),e.createElementBlock("div",{key:f.id,onClick:e.withModifiers(w=>C(f,w),["stop"]),onContextmenu:w=>d(f,w),class:"GRID_ITEM cursor-pointer"},[e.createElementVNode("div",{class:e.normalizeClass(["aspect-square bg-muted rounded-xl overflow-hidden mb-2 transition-all duration-200",{"outline outline-4 outline-primary/50":e.unref(o).includes(f.id)}])},[f.featuredMedia?(e.openBlock(),e.createElementBlock("img",{key:0,src:f.featuredMedia,class:"w-full h-full object-cover pointer-events-none",draggable:"false"},null,8,te)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",null,[e.createElementVNode("p",oe,e.toDisplayString(f.title),1),e.createElementVNode("p",ne,[e.createElementVNode("span",le,[f.status==="published"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l[1]||(l[1]=e.createElementVNode("span",{class:"block shrink-0 size-3 rounded-full bg-green-500"},null,-1)),l[2]||(l[2]=e.createTextVNode(" Published ",-1))],64)):f.status==="draft"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l[3]||(l[3]=e.createElementVNode("span",{class:"block shrink-0 size-3 rounded-full bg-blue-500"},null,-1)),l[4]||(l[4]=e.createTextVNode(" Draft ",-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l[5]||(l[5]=e.createElementVNode("span",{class:"block shrink-0 size-3 rounded-full bg-gray-300"},null,-1)),l[6]||(l[6]=e.createTextVNode(" Archived ",-1))],64))]),f.variantsTotal>1?(e.openBlock(),e.createElementBlock("span",re,"| "+e.toDisplayString(f.variantsTotal)+" variants",1)):e.createCommentVNode("",!0)])])],40,ee))),128))])],32))}}),ae={class:"flex items-center gap-2"},ie={key:0,class:"bg-green-500 text-green-950 px-2 py-1 rounded-lg text-xs"},ce={key:1,class:"bg-blue-500 text-blue-950 px-2 py-1 rounded-lg text-xs"},ue={key:2,class:"bg-gray-500 text-gray-950 px-2 py-1 rounded-lg text-xs"},de=e.defineComponent({__name:"ListView",props:{products:{type:Array,required:!0}},setup(g){const o=e.inject("selection"),{navigateTo:m}=h.useModuleRoute(),{hasPermission:V}=h.useModulePermissions(),C=(n,d)=>{n?o.value.push(d):o.value=o.value.filter(s=>s!==d)};return(n,d)=>{const s=e.resolveComponent("TableHead"),l=e.resolveComponent("TableRow"),f=e.resolveComponent("TableHeader"),w=e.resolveComponent("Checkbox"),r=e.resolveComponent("TableCell"),u=e.resolveComponent("AvatarImage"),t=e.resolveComponent("AvatarFallback"),p=e.resolveComponent("Avatar"),x=e.resolveComponent("TableBody"),N=e.resolveComponent("Table"),b=e.resolveComponent("Card");return e.openBlock(),e.createBlock(b,{class:"w-full py-4 px-4"},{default:e.withCtx(()=>[e.createVNode(N,{class:"rounded overflow-hidden"},{default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createVNode(l,null,{default:e.withCtx(()=>[e.unref(o)?.length>0?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),e.createVNode(s,null,{default:e.withCtx(()=>[...d[1]||(d[1]=[e.createTextVNode("Title",-1)])]),_:1}),e.createVNode(s,null,{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createTextVNode("Status",-1)])]),_:1}),e.createVNode(s,null,{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode(" Variants",-1)])]),_:1}),e.createVNode(s,null,{default:e.withCtx(()=>[...d[4]||(d[4]=[e.createTextVNode("Price",-1)])]),_:1})]),_:1})]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.products,v=>(e.openBlock(),e.createBlock(l,{key:v.id,onClick:_=>e.unref(m)(v.id),class:"cursor-pointer"},{default:e.withCtx(()=>[e.unref(o)?.length>0?(e.openBlock(),e.createBlock(r,{key:0},{default:e.withCtx(()=>[e.createVNode(w,{"model-value":e.unref(o)?.includes(v.id),"onUpdate:modelValue":_=>C(_,v.id),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["prevent","stop"]))},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(r,{class:"font-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",ae,[e.createVNode(p,{class:"size-12 rounded-xl"},{default:e.withCtx(()=>[e.createVNode(u,{src:v.media?.[0],class:"object-cover"},null,8,["src"]),e.createVNode(t,{class:"rounded-xl"})]),_:2},1024),e.createElementVNode("span",null,e.toDisplayString(v.title),1)])]),_:2},1024),e.createVNode(r,null,{default:e.withCtx(()=>[v.status==="published"?(e.openBlock(),e.createElementBlock("span",ie,"Published")):v.status==="draft"?(e.openBlock(),e.createElementBlock("span",ce,"Draft")):v.status==="archived"?(e.openBlock(),e.createElementBlock("span",ue,"Archived")):e.createCommentVNode("",!0)]),_:2},1024),e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.variantsTotal),1)]),_:2},1024),e.createVNode(r,{class:"text-right"},{default:e.withCtx(()=>[e.createTextVNode(" € "+e.toDisplayString(v.price||0),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1})]),_:1})}}}),O=F.isClient?window:void 0;function $(g){var o;const m=e.toValue(g);return(o=m?.$el)!=null?o:m}function me(){const g=e.shallowRef(!1),o=e.getCurrentInstance();return o&&e.onMounted(()=>{g.value=!0},o),g}function pe(g){const o=me();return e.computed(()=>(o.value,!!g()))}function fe(g,o,m={}){const{window:V=O,...C}=m;let n;const d=pe(()=>V&&"ResizeObserver"in V),s=()=>{n&&(n.disconnect(),n=void 0)},l=e.computed(()=>{const r=e.toValue(g);return Array.isArray(r)?r.map(u=>$(u)):[$(r)]}),f=e.watch(l,r=>{if(s(),d.value&&V){n=new ResizeObserver(o);for(const u of r)u&&n.observe(u,C)}},{immediate:!0,flush:"post"}),w=()=>{s(),f()};return F.tryOnScopeDispose(w),{isSupported:d,stop:w}}function ve(g,o={width:0,height:0},m={}){const{window:V=O,box:C="content-box"}=m,n=e.computed(()=>{var r,u;return(u=(r=$(g))==null?void 0:r.namespaceURI)==null?void 0:u.includes("svg")}),d=e.shallowRef(o.width),s=e.shallowRef(o.height),{stop:l}=fe(g,([r])=>{const u=C==="border-box"?r.borderBoxSize:C==="content-box"?r.contentBoxSize:r.devicePixelContentBoxSize;if(V&&n.value){const t=$(g);if(t){const p=t.getBoundingClientRect();d.value=p.width,s.value=p.height}}else if(u){const t=F.toArray(u);d.value=t.reduce((p,{inlineSize:x})=>p+x,0),s.value=t.reduce((p,{blockSize:x})=>p+x,0)}else d.value=r.contentRect.width,s.value=r.contentRect.height},m);F.tryOnMounted(()=>{const r=$(g);r&&(d.value="offsetWidth"in r?r.offsetWidth:o.width,s.value="offsetHeight"in r?r.offsetHeight:o.height)});const f=e.watch(()=>$(g),r=>{d.value=r?o.width:0,s.value=r?o.height:0});function w(){l(),f()}return{width:d,height:s,stop:w}}const Ce={class:"truncate"},xe={key:0},ge={key:1},Ve={key:2},we={key:3},Ne={class:"relative w-full max-w-sm items-center"},be={class:"truncate"},ke={class:"truncate"},he={class:"flex items-center space-x-2 mb-4"},_e={class:"flex items-center space-x-2 mb-4"},ye={class:"flex items-center space-x-2 mb-4"},Be=e.defineComponent({__name:"FilterPopover",setup(g){const o=e.inject("filter"),m=e.inject("collections"),V=()=>{o.value={collections:[],published:!0,draft:!0,archived:!1}};return(C,n)=>{const d=e.resolveComponent("Button"),s=e.resolveComponent("PopoverTrigger"),l=e.resolveComponent("ComboboxTrigger"),f=e.resolveComponent("ComboboxAnchor"),w=e.resolveComponent("ComboboxInput"),r=e.resolveComponent("ComboboxEmpty"),u=e.resolveComponent("ComboboxItemIndicator"),t=e.resolveComponent("ComboboxItem"),p=e.resolveComponent("ScrollArea"),x=e.resolveComponent("ComboboxGroup"),N=e.resolveComponent("ComboboxList"),b=e.resolveComponent("Combobox"),v=e.resolveComponent("Checkbox"),_=e.resolveComponent("PopoverContent"),y=e.resolveComponent("Popover");return e.openBlock(),e.createBlock(y,null,{default:e.withCtx(()=>[e.createVNode(s,{asChild:""},{default:e.withCtx(()=>[e.createVNode(d,{variant:"outline"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Filter),{class:"size-4"}),n[4]||(n[4]=e.createTextVNode(" Filter ",-1))]),_:1})]),_:1}),e.createVNode(_,{class:"w-64"},{default:e.withCtx(()=>[n[14]||(n[14]=e.createElementVNode("p",{class:"text-sm font-medium text-muted-foreground mb-4"}," Filter by Collection ",-1)),e.createVNode(b,{modelValue:e.unref(o).collections,"onUpdate:modelValue":n[0]||(n[0]=i=>e.unref(o).collections=i),by:"id",multiple:!0,class:"mb-6"},{default:e.withCtx(()=>[e.createVNode(f,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(l,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(d,{variant:"outline",class:"justify-between w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",Ce,[e.unref(o).collections.length===1?(e.openBlock(),e.createElementBlock("span",xe,e.toDisplayString(e.unref(m).find(i=>i.id===e.unref(o).collections[0])?.title),1)):e.unref(o).collections.length===2?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(e.unref(m).find(i=>i.id===e.unref(o).collections[0])?.title)+", "+e.toDisplayString(e.unref(m).find(i=>i.id===e.unref(o).collections[1])?.title),1)):e.unref(o).collections.length>2?(e.openBlock(),e.createElementBlock("span",Ve,e.toDisplayString(e.unref(m).find(i=>i.id===e.unref(o).collections[0])?.title)+", "+e.toDisplayString(e.unref(m).find(i=>i.id===e.unref(o).collections[1])?.title)+" + "+e.toDisplayString(e.unref(o).collections.length-2),1)):(e.openBlock(),e.createElementBlock("span",we,"Select collection"))]),e.createVNode(e.unref(E.ChevronsUpDown),{class:"ml-2 size-4 shrink-0 opacity-50"})]),_:1})]),_:1})]),_:1}),e.createVNode(N,null,{default:e.withCtx(()=>[e.createElementVNode("div",Ne,[e.createVNode(w,{placeholder:"Select category..."})]),e.createVNode(r,null,{default:e.withCtx(()=>[...n[5]||(n[5]=[e.createTextVNode(" No category found. ",-1)])]),_:1}),e.unref(m)?.filter(i=>i.status==="published")?.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n[7]||(n[7]=e.createElementVNode("p",{class:"px-2 py-1.5 text-sm font-medium mt-2"},"Published",-1)),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"max-h-[200px] overflow-y-auto"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m).filter(i=>i.status==="published"),i=>(e.openBlock(),e.createBlock(t,{key:i.id,value:i.id},{default:e.withCtx(()=>[n[6]||(n[6]=e.createElementVNode("span",{class:"size-2 rounded-full bg-green-500"},null,-1)),e.createElementVNode("span",be,e.toDisplayString(i.title),1),e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(E.Check),{class:e.normalizeClass(e.unref(U.classNames)("ml-auto size-4"))},null,8,["class"])]),_:1})]),_:2},1032,["value"]))),128))]),_:1})]),_:1})],64)):e.createCommentVNode("",!0),e.unref(m)?.filter(i=>i.status==="draft")?.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n[9]||(n[9]=e.createElementVNode("p",{class:"px-2 py-1.5 text-sm font-medium"},"Drafts",-1)),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"max-h-[200px] overflow-y-auto"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m).filter(i=>i.status==="draft"),i=>(e.openBlock(),e.createBlock(t,{key:i.id,value:i.id},{default:e.withCtx(()=>[n[8]||(n[8]=e.createElementVNode("span",{class:"size-2 rounded-full bg-blue-500"},null,-1)),e.createElementVNode("span",ke,e.toDisplayString(i.title),1),e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(e.unref(E.Check),{class:e.normalizeClass(e.unref(U.classNames)("ml-auto size-4"))},null,8,["class"])]),_:1})]),_:2},1032,["value"]))),128))]),_:1})]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["modelValue"]),n[15]||(n[15]=e.createElementVNode("p",{class:"text-sm font-medium text-muted-foreground mb-4"}," Filter by Status ",-1)),e.createElementVNode("div",he,[e.createVNode(v,{id:"chk_published_products",modelValue:e.unref(o).published,"onUpdate:modelValue":n[1]||(n[1]=i=>e.unref(o).published=i)},null,8,["modelValue"]),n[10]||(n[10]=e.createElementVNode("label",{for:"chk_published_products",class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"}," Show published products ",-1))]),e.createElementVNode("div",_e,[e.createVNode(v,{id:"chk_draft_products",modelValue:e.unref(o).draft,"onUpdate:modelValue":n[2]||(n[2]=i=>e.unref(o).draft=i)},null,8,["modelValue"]),n[11]||(n[11]=e.createElementVNode("label",{for:"chk_draft_products",class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"}," Show draft products ",-1))]),e.createElementVNode("div",ye,[e.createVNode(v,{id:"chk_archived_products",modelValue:e.unref(o).archived,"onUpdate:modelValue":n[3]||(n[3]=i=>e.unref(o).archived=i)},null,8,["modelValue"]),n[12]||(n[12]=e.createElementVNode("label",{for:"chk_archived_products",class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"}," Show archived products ",-1))]),e.unref(o).collections.length>0||!e.unref(o).published||!e.unref(o).draft||e.unref(o).archived?(e.openBlock(),e.createBlock(d,{key:0,variant:"secondary",class:"ml-auto my-2",size:"sm",onClick:V},{default:e.withCtx(()=>[e.createVNode(e.unref(E.RotateCcw),{class:"size-3"}),n[13]||(n[13]=e.createElementVNode("span",{class:"ml-0.5 text-xs"},"Reset filters",-1))]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1})}}}),Ee=e.defineComponent({__name:"ProductContextMenu",emits:["selectAll","duplicateProduct","deleteProduct","deleteSelection"],setup(g,{emit:o}){const m=o,V=e.inject("products"),C=e.inject("selection"),n=e.inject("config"),{hasPermission:d}=h.useModulePermissions(),{navigateTo:s}=h.useModuleRoute(),l=e.computed(()=>C.value?.length!==1?null:V.value?.find(u=>u.id===C.value[0])),f=u=>{let t=n.previewUrl;t=t.replace("{{ id","{{id"),t=t.replace("id }}","id}}"),t=t.replace("{{id}}",u.id),t=t.replace("{{ slug","{{slug"),t=t.replace("slug }}","slug}}"),t=t.replace("{{slug}}",u.slug),window.open(t,"_blank")},w=async(u,t)=>{try{if(!["draft","published","archived"].includes(t))return;await h.useFirebaseIntegration(n.project).update(n.productCollection,u.id,{status:t}),u.status=t,B.toast.success("Product status changed")}catch{B.toast.error("Failed to change product status")}},r=async u=>{try{if(!["draft","published","archived"].includes(u))return;const t=h.useFirebaseIntegration(n.project),p=[];C.value.forEach(async x=>{p.push(t.update(n.productCollection,x,{status:u}))}),B.toast.promise(Promise.all(p),{loading:`Changing status of ${C.value.length} products...`,success:()=>{const x=C.value.length;return C.value.forEach(N=>{V.value.find(b=>b.id==N).status=u}),C.value=[],`Product status changed for ${x} products`},error:x=>"Failed to change product status"})}catch{B.toast.error("Failed to change product status")}};return(u,t)=>{const p=e.resolveComponent("ContextMenuTrigger"),x=e.resolveComponent("ContextMenuShortcut"),N=e.resolveComponent("ContextMenuItem"),b=e.resolveComponent("ContextMenuContent"),v=e.resolveComponent("ContextMenuSeparator"),_=e.resolveComponent("ContextMenuSubTrigger"),y=e.resolveComponent("ContextMenuCheckboxItem"),i=e.resolveComponent("ContextMenuSubContent"),D=e.resolveComponent("ContextMenuSub"),I=e.resolveComponent("ContextMenu");return e.openBlock(),e.createBlock(I,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"flex flex-1"},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:3}),e.unref(C).length===0?(e.openBlock(),e.createBlock(b,{key:0,class:"w-64"},{default:e.withCtx(()=>[e.createVNode(N,{inset:"",onClick:t[0]||(t[0]=k=>m("selectAll"))},{default:e.withCtx(()=>[t[13]||(t[13]=e.createTextVNode(" Select all ",-1)),e.createVNode(x,null,{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode("⌘ + A",-1)])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),e.unref(C).length===1&&l.value?(e.openBlock(),e.createBlock(b,{key:1,class:"w-64"},{default:e.withCtx(()=>[e.createVNode(N,{inset:"",onClick:t[1]||(t[1]=k=>e.unref(s)(l.value.id))},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createTextVNode(" Edit product ",-1)])]),_:1}),e.createVNode(v),e.unref(n).previewUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(N,{inset:"",onClick:t[2]||(t[2]=k=>f(l.value))},{default:e.withCtx(()=>[t[15]||(t[15]=e.createTextVNode(" Preview product ",-1)),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(e.unref(E.ExternalLink),{class:"size-4"})]),_:1})]),_:1}),e.createVNode(v)],64)):e.createCommentVNode("",!0),e.createVNode(N,{inset:"",onClick:t[3]||(t[3]=k=>m("duplicateProduct",l.value))},{default:e.withCtx(()=>[...t[16]||(t[16]=[e.createTextVNode(" Duplicate product ",-1)])]),_:1}),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(_,{inset:""},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode(" Change status ",-1)])]),_:1}),e.createVNode(i,{class:"w-48"},{default:e.withCtx(()=>[e.createVNode(y,{onClick:t[4]||(t[4]=k=>w(l.value,"draft")),modelValue:l.value.status==="draft"},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-blue-500"},null,-1),e.createTextVNode(" Draft ",-1)])]),_:1},8,["modelValue"]),e.createVNode(y,{onClick:t[5]||(t[5]=k=>w(l.value,"published")),modelValue:l.value.status==="published"},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-green-500"},null,-1),e.createTextVNode(" Published ",-1)])]),_:1},8,["modelValue"]),e.createVNode(y,{onClick:t[6]||(t[6]=k=>w(l.value,"archived")),modelValue:l.value.status==="archived"},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-gray-300"},null,-1),e.createTextVNode(" Archived ",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1}),e.createVNode(N,{inset:"",variant:"destructive",onClick:t[7]||(t[7]=k=>m("deleteProduct",l.value))},{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode(" Delete product ",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0),e.unref(C).length>1?(e.openBlock(),e.createBlock(b,{key:2,class:"w-64"},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(_,{inset:""},{default:e.withCtx(()=>[e.createTextVNode(" Change status ("+e.toDisplayString(e.unref(C).length)+") ",1)]),_:1}),e.createVNode(i,{class:"w-48"},{default:e.withCtx(()=>[e.createVNode(y,{onClick:t[8]||(t[8]=k=>r("draft"))},{default:e.withCtx(()=>[...t[22]||(t[22]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-blue-500"},null,-1),e.createTextVNode(" Draft ",-1)])]),_:1}),e.createVNode(y,{onClick:t[9]||(t[9]=k=>r("published"))},{default:e.withCtx(()=>[...t[23]||(t[23]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-green-500"},null,-1),e.createTextVNode(" Published ",-1)])]),_:1}),e.createVNode(y,{onClick:t[10]||(t[10]=k=>r("archived"))},{default:e.withCtx(()=>[...t[24]||(t[24]=[e.createElementVNode("span",{class:"size-2 rounded-full bg-gray-300"},null,-1),e.createTextVNode(" Archived ",-1)])]),_:1})]),_:1})]),_:1}),e.createVNode(N,{inset:"",variant:"destructive",onClick:t[11]||(t[11]=k=>m("deleteSelection"))},{default:e.withCtx(()=>[e.createTextVNode(" Delete products ("+e.toDisplayString(e.unref(C).length)+") ",1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:3})}}}),Pe={class:"relative flex flex-col flex-1"},Se={ref:"container",class:"flex items-center justify-between gap-4 w-full mt-12 mb-8"},Te={class:"flex items-center gap-4"},Me={class:"text-lg whitespace-nowrap"},$e={class:"relative w-full max-w-sm items-center"},De={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},ze={class:"flex items-center gap-4"},Ae={class:"flex flex-1"},Fe=e.defineComponent({__name:"Overview",props:{config:{type:Object,required:!0}},async setup(g){let o,m;const V=g,{hasPermission:C}=h.useModulePermissions(),{navigateTo:n}=h.useModuleRoute(),{confirm:d}=h.useConfirmation();h.useModuleBreadcrumbs(()=>[]);const s=h.useFirebaseIntegration(V.config.project),l=e.ref([]),f=async()=>{const c=await s.find(V.config.productCollection);l.value=c||[]},w=e.useTemplateRef("container"),{width:r}=ve(w),u=e.ref("grid"),t=e.ref(1),p=e.ref([]),x=e.ref(""),N=e.ref([]);N.value=([o,m]=e.withAsyncContext(()=>y()),o=await o,m(),o);const b=e.computed(()=>u.value==="grid"?r.value<768?6:r.value<896?8:r.value<1024?10:12:10),v=e.computed(()=>l.value.filter(c=>!(T.value.collections.length>0&&!c.collections?.some(a=>T.value.collections.includes(a))||!T.value.published&&c.status==="published"||!T.value.draft&&c.status==="draft"||!T.value.archived&&c.status==="archived")).filter(c=>c.title.toLowerCase().includes(x.value.toLowerCase())||c.slug.toLowerCase().includes(x.value.toLowerCase())||c.id.toLowerCase().includes(x.value.toLowerCase()))),_=e.computed(()=>{if(v.value.length<=b.value)return v.value;const c=(t.value-1)*b.value,a=c+b.value;return v.value.slice(c,a)});async function y(){if(!V.config.collectionsCollection)return[];const c=V.config.collectionsCollection.split(":");return c.length!==2?[]:(await s.get(c[0]))?.[c[1]]||[]}async function i(c){return(await s.find(V.config.productCollection,{filters:[{field:"slug",operator:"==",value:c}]})).length>0}const D=()=>{p.value=_.value.map(c=>c.id)},I=async c=>{try{let a={...c},S=a.slug+"-copy",M=2;for(;await i(S);)S=a.slug+"-copy-"+M,M++;a.id=void 0,a.createdAt=new Date,a.updatedAt=new Date,a.slug=S,a.status="draft",a.title=a.title+" (copy)";const A=await s.add(V.config.productCollection,a);n(A.id),B.toast.success("Product duplicated")}catch{B.toast.error("Failed to duplicate product")}},k=async c=>{if(await d(`Are you sure you want to delete "${c.title}"?`))try{await s.remove(V.config.productCollection,c.id),l.value=l.value.filter(S=>S.id!==c.id),p.value=[],B.toast.success("Product deleted")}catch{B.toast.error("Failed to delete product")}},L=async()=>{if(await d(`Are you sure you want to delete all selected products (${p.value.length})?`))try{p.value.forEach(async a=>{await s.remove(V.config.productCollection,a)}),l.value=l.value.filter(a=>!p.value.includes(a.id)),p.value=[],B.toast.success("Products deleted")}catch{B.toast.error("Failed to delete products")}},T=e.ref({collections:[],published:!0,draft:!0,archived:!1});e.watch(T,()=>{t.value=1});const R=c=>{c.target?.matches("input, textarea")||c.target?.isContentEditable||(c.key==="Escape"&&(p.value=[]),(c.metaKey||c.ctrlKey)&&c.key.toLowerCase()==="a"&&(c.preventDefault(),D()))};return e.onMounted(()=>{f(),window.addEventListener("keydown",R)}),e.onUnmounted(()=>{window.removeEventListener("keydown",R)}),e.provide("config",V.config),e.provide("filter",T),e.provide("products",l),e.provide("collections",N),e.provide("selection",p),(c,a)=>{const S=e.resolveComponent("Input"),M=e.resolveComponent("Button"),A=e.resolveComponent("SegmentedControlButton"),K=e.resolveComponent("SegmentedControl"),q=e.resolveComponent("PaginationFirst"),G=e.resolveComponent("PaginationPrev"),H=e.resolveComponent("PaginationListItem"),W=e.resolveComponent("PaginationEllipsis"),Q=e.resolveComponent("PaginationNext"),X=e.resolveComponent("PaginationLast"),J=e.resolveComponent("PaginationList"),Y=e.resolveComponent("Pagination");return e.openBlock(),e.createElementBlock("div",Pe,[e.createElementVNode("div",Se,[e.createElementVNode("div",Te,[e.createElementVNode("p",Me,e.toDisplayString(v.value?.length)+" products",1),e.createElementVNode("div",$e,[e.createVNode(S,{id:"search",type:"text",placeholder:"Search...",class:"pl-8",onKeydown:a[0]||(a[0]=e.withKeys(P=>x.value="",["escape"])),modelValue:x.value,"onUpdate:modelValue":a[1]||(a[1]=P=>x.value=P)},null,8,["modelValue"]),e.createElementVNode("span",De,[e.createVNode(e.unref(E.Search),{class:"size-4 text-muted-foreground"})])])]),e.createElementVNode("div",ze,[p.value.length>0?(e.openBlock(),e.createBlock(M,{key:0,variant:"destructive",onClick:L},{default:e.withCtx(()=>[e.createTextVNode(" Delete Selection ("+e.toDisplayString(p.value.length)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.unref(C)("create-product")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(M,{variant:"outline",onClick:a[2]||(a[2]=P=>e.unref(n)("new"))},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Plus),{class:"size-4"}),a[5]||(a[5]=e.createTextVNode(" New Product ",-1))]),_:1}),a[6]||(a[6]=e.createElementVNode("div",{class:"w-[1px] h-8 bg-border"},null,-1))],64)):e.createCommentVNode("",!0),e.createVNode(Be),a[7]||(a[7]=e.createElementVNode("div",{class:"w-[1px] h-8 bg-border"},null,-1)),e.createElementVNode("div",null,[e.createVNode(K,{modelValue:u.value,"onUpdate:modelValue":a[3]||(a[3]=P=>u.value=P),"aria-label":"View mode"},{default:e.withCtx(()=>[e.createVNode(A,{value:"grid"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.LayoutGrid),{class:"size-4"})]),_:1}),e.createVNode(A,{value:"list"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.List),{class:"size-4"})]),_:1})]),_:1},8,["modelValue"])])])],512),e.createElementVNode("div",Ae,[e.createVNode(Ee,{onSelectAll:D,onDuplicateProduct:I,onDeleteProduct:k,onDeleteSelection:L},{default:e.withCtx(()=>[u.value==="grid"?(e.openBlock(),e.createBlock(se,{key:0,products:_.value},null,8,["products"])):(e.openBlock(),e.createBlock(de,{key:1,products:_.value},null,8,["products"]))]),_:1})]),v.value?.length>b.value?(e.openBlock(),e.createBlock(Y,{key:0,page:t.value,"onUpdate:page":a[4]||(a[4]=P=>t.value=P),"items-per-page":b.value,total:v.value?.length,"sibling-count":1,"show-edges":""},{default:e.withCtx(()=>[e.createVNode(J,{class:"flex items-center gap-1"},{default:e.withCtx(({items:P})=>[e.createVNode(q),e.createVNode(G),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P,(z,j)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[z.type==="page"?(e.openBlock(),e.createBlock(H,{key:j,value:z.value,"as-child":""},{default:e.withCtx(()=>[e.createVNode(M,{class:"size-10 p-0",variant:z.value===t.value?"default":"outline"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(z.value),1)]),_:2},1032,["variant"])]),_:2},1032,["value"])):(e.openBlock(),e.createBlock(W,{key:z.type,index:j},null,8,["index"]))],64))),256)),e.createVNode(Q),e.createVNode(X)]),_:1})]),_:1},8,["page","items-per-page","total"])):e.createCommentVNode("",!0)])}}});exports.default=Fe;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("lucide-vue-next"),r=require("@oneclick.dev/cms-kit"),N=require("./countries-CgZ081No.js"),C={class:"flex items-center gap-2"},h={class:"flex items-center gap-2"},v={key:0},w={key:1},x={key:2},y={class:"flex items-center gap-2"},k=e.defineComponent({__name:"ListView",props:{options:{type:Array,required:!0}},setup(d){const{navigateTo:c}=r.useModuleRoute(),{hasPermission:V}=r.useModulePermissions();return(g,n)=>{const a=e.resolveComponent("TableHead"),m=e.resolveComponent("TableRow"),p=e.resolveComponent("TableHeader"),s=e.resolveComponent("TableCell"),_=e.resolveComponent("Button"),l=e.resolveComponent("TableBody"),o=e.resolveComponent("Table");return e.openBlock(),e.createBlock(o,null,{default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[...n[0]||(n[0]=[e.createTextVNode("Name",-1)])]),_:1}),e.createVNode(a,null,{default:e.withCtx(()=>[...n[1]||(n[1]=[e.createTextVNode("Countries",-1)])]),_:1}),e.createVNode(a,null,{default:e.withCtx(()=>[...n[2]||(n[2]=[e.createTextVNode("Price",-1)])]),_:1}),e.createVNode(a,null,{default:e.withCtx(()=>[...n[3]||(n[3]=[e.createTextVNode("Actions",-1)])]),_:1})]),_:1})]),_:1}),e.createVNode(l,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.options,t=>(e.openBlock(),e.createBlock(m,{key:t.id,onClick:u=>e.unref(c)(t.id),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(s,{class:"font-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",C,[e.createElementVNode("span",null,e.toDisplayString(t.title),1)])]),_:2},1024),e.createVNode(s,null,{default:e.withCtx(()=>[e.createElementVNode("div",h,[!t.countries||t.countries.length===0?(e.openBlock(),e.createElementBlock("span",v,"Everywhere")):e.createCommentVNode("",!0),t.countries&&t.countries.length<3?(e.openBlock(),e.createElementBlock("span",w,e.toDisplayString(t.countries.map(u=>e.unref(N.rawCountries).find(i=>i.cca2===u)?.name.common).join(", ")),1)):e.createCommentVNode("",!0),t.countries&&t.countries.length>=3?(e.openBlock(),e.createElementBlock("span",x,e.toDisplayString(t.countries.length)+" countries",1)):e.createCommentVNode("",!0)])]),_:2},1024),e.createVNode(s,null,{default:e.withCtx(()=>[e.createElementVNode("div",y,[e.createElementVNode("span",null,e.toDisplayString(t.price||"FREE"),1)])]),_:2},1024),e.createVNode(s,null,{default:e.withCtx(()=>[e.createVNode(_,{variant:"ghost",size:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.Pencil),{class:"size-4"})]),_:1})]),_:1})]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1})}}}),B={class:"relative"},b={ref:"container",class:"flex items-center justify-between gap-4 w-full mt-12 mb-8"},E={class:"flex items-center gap-4"},T={class:"text-lg whitespace-nowrap"},$={class:"relative w-full max-w-sm items-center"},P={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},S={class:"flex items-center gap-4"},O=e.defineComponent({__name:"Overview",props:{config:{type:Object,required:!0}},setup(d){const c=d,{hasPermission:V}=r.useModulePermissions(),{navigateTo:g}=r.useModuleRoute(),{log:n,logWarning:a,logError:m}=r.useLogs();r.useModuleBreadcrumbs(()=>[]);const p=r.useFirebaseIntegration(c.config.project),s=e.ref([]),_=async()=>{const l=async()=>{if(!c.config.shippingOptionsCollection)return[];const o=c.config.shippingOptionsCollection.split(":");return o.length!==2?[]:(await p.get(o[0]))?.[o[1]]||[]};return s.value=await l(),s.value};return e.onMounted(()=>{_()}),(l,o)=>{const t=e.resolveComponent("Input"),u=e.resolveComponent("Button");return e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",b,[e.createElementVNode("div",E,[e.createElementVNode("p",T,e.toDisplayString(s.value?.length)+" options",1),e.createElementVNode("div",$,[e.createVNode(t,{id:"search",type:"text",placeholder:"Search...",class:"pl-8",modelValue:l.searchQuery,"onUpdate:modelValue":o[0]||(o[0]=i=>l.searchQuery=i),onKeydown:o[1]||(o[1]=e.withKeys(i=>l.searchQuery="",["escape"]))},null,8,["modelValue"]),e.createElementVNode("span",P,[e.createVNode(e.unref(f.Search),{class:"size-4 text-muted-foreground"})])])]),e.createElementVNode("div",S,[e.unref(V)("create-option")?(e.openBlock(),e.createBlock(u,{key:0,variant:"outline",onClick:o[2]||(o[2]=i=>e.unref(g)("new"))},{default:e.withCtx(()=>[e.createVNode(e.unref(f.Plus),{class:"size-4"}),o[3]||(o[3]=e.createTextVNode(" New Option ",-1))]),_:1})):e.createCommentVNode("",!0)])],512),e.createVNode(k,{options:s.value},null,8,["options"])])}}});exports.default=O;