@oneclick.dev/cms-core-modules 0.0.119 → 0.0.120

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 (38) hide show
  1. package/dist/{ContentEditor-Cm28u_14.mjs → ContentEditor-W4YrQyBW.mjs} +3962 -3700
  2. package/dist/{ContentEditor-BnOVpmsQ.js → ContentEditor-YFnqVZrX.js} +42 -41
  3. package/dist/{EditLayout.vue_vue_type_script_setup_true_lang-pDO9b4Pv.mjs → EditLayout.vue_vue_type_script_setup_true_lang-BXVf9gZW.mjs} +20 -20
  4. package/dist/{EditLayout.vue_vue_type_script_setup_true_lang-gozJKXvM.js → EditLayout.vue_vue_type_script_setup_true_lang-CFFZ6r8i.js} +1 -1
  5. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BdZbcubW.js +1 -0
  6. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-bZidw6RT.mjs +1500 -0
  7. package/dist/Overview-Tf_ApkWh.js +1 -0
  8. package/dist/{Overview-CVQ1pkuD.mjs → Overview-usm5gPD1.mjs} +131 -131
  9. package/dist/{agenda-BtmnpFmi.js → agenda-BusN9-XG.js} +1 -1
  10. package/dist/{agenda-D0QBOJUy.mjs → agenda-CJXKaIo0.mjs} +7 -7
  11. package/dist/{availability-D8JdA4rP.mjs → availability-BP6GACqo.mjs} +1 -1
  12. package/dist/{availability-ClBGVgE9.js → availability-UUKdgidr.js} +1 -1
  13. package/dist/{booking-data-aMS1p_3g.js → booking-data-BHfLyOlu.js} +1 -1
  14. package/dist/{booking-data-Px7XCIfU.mjs → booking-data-WCBcpOOo.mjs} +1 -1
  15. package/dist/cms-core-modules.css +1 -1
  16. package/dist/{exceptions-Dgj54ULn.mjs → exceptions-B8r2psu2.mjs} +1 -1
  17. package/dist/{exceptions-DXqc0Nza.js → exceptions-BazAiy2s.js} +1 -1
  18. package/dist/index-BiKWKrEs.js +35 -0
  19. package/dist/index-DJxex3Dt.mjs +1256 -0
  20. package/dist/index.cjs.js +1 -1
  21. package/dist/index.mjs +11 -11
  22. package/dist/{orders-C5NT99Fy.mjs → orders-B8C6u4iF.mjs} +229 -234
  23. package/dist/orders-CAAuDhkQ.js +1 -0
  24. package/dist/{payment-D5j-68Ig.mjs → payment-BOOJ1O6M.mjs} +1 -1
  25. package/dist/{payment-BJHgpaeT.js → payment-IxA9qiCV.js} +1 -1
  26. package/dist/{refunds-D9nTeD2d.mjs → refunds-CI0qpJC0.mjs} +1 -1
  27. package/dist/{refunds-oVB2Opib.js → refunds-CqGKm1NG.js} +1 -1
  28. package/dist/{resources-8WouFvJe.js → resources-B75nXreU.js} +1 -1
  29. package/dist/{resources-CK0oWssj.mjs → resources-dIZDh4Sz.mjs} +1 -1
  30. package/dist/src/appointments/components/edit/NewReservationDialog/QuickReservationAdder.vue.d.ts +2 -0
  31. package/dist/src/appointments/components/edit/NewReservationDialog/ReservationLines.vue.d.ts +1 -0
  32. package/package.json +2 -2
  33. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-CcMEKZzd.mjs +0 -1476
  34. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-CkFsdcvP.js +0 -1
  35. package/dist/Overview-CBahJviK.js +0 -1
  36. package/dist/index-BnFWz40Q.mjs +0 -1261
  37. package/dist/index-DcGPR_vt.js +0 -35
  38. package/dist/orders-lO3dZ5un.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("@oneclick.dev/cms-kit"),s=require("lucide-vue-next"),ce={class:"container @container mx-auto py-8"},ue={key:0,class:"flex justify-center py-24"},me={class:"flex gap-2"},pe={key:2},fe={class:"flex flex-col gap-4 mb-6 @md:flex-row @md:items-end @md:justify-between"},ge={class:"flex flex-wrap items-center gap-2"},ve={class:"relative"},xe={key:0,class:"flex flex-wrap items-center justify-between gap-3 mb-4 px-4 py-3 rounded-lg border bg-muted/40"},Ce={class:"flex items-center gap-3"},Ne={class:"text-sm font-medium"},ye={class:"flex items-center gap-2"},Ve={key:1,class:"flex flex-col items-center justify-center py-16 text-center border border-dashed rounded-lg"},we={class:"font-medium"},he={key:2,class:"grid gap-4 @md:grid-cols-2 @3xl:grid-cols-3"},_e=["onClick"],ke=["onClick"],be={class:"flex items-start gap-3"},Ee=["onClick"],Ae={class:"text-base font-semibold leading-tight line-clamp-1"},Se={class:"flex items-center gap-2 mt-1"},Be={key:0,class:"text-xs text-muted-foreground cursor-pointer"},De={key:0,class:"shrink-0"},$e={class:"grid grid-cols-3 gap-2 mt-5"},Me={class:"flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2"},Te={class:"flex items-center gap-1 text-muted-foreground"},ze={class:"text-sm font-semibold"},Ie={class:"flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2"},Pe={class:"flex items-center gap-1 text-muted-foreground"},je={class:"text-sm font-semibold"},Fe={class:"flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2"},Ue={class:"flex items-center gap-1 text-muted-foreground"},Oe={class:"text-sm font-semibold"},Re={key:0,class:"flex items-center justify-between gap-2 px-5 py-3 border-t bg-muted/20"},S="privateSettings",G="refundFlow",L="metadataSchema",B="_privateSettings",Ge=e.defineComponent({__name:"Overview",setup(Le){const{config:c}=y.useModule(),u=y.useFirebaseIntegration(c.project),{navigateTo:N}=y.useModuleRoute(),{confirm:q}=y.useConfirmation(),{hasPermission:f,hasAnyPermission:H}=y.useModulePermissions();y.useModuleBreadcrumbs(()=>[]);const m=e.ref(null),w=e.ref(""),d=e.ref(!1),a=e.ref([]),D=e.ref("importAgendasInput"),J=["id",B,"metadataSchema","refundFlow","refundFlowEnabled","refundDialog"],$=(o,t)=>`${c.agendaCollection}/${o}/${S}/${t}`,h=o=>{if(!o||typeof o!="object")return null;const{id:t,...r}=o;return r},M=o=>!!o&&typeof o=="object"&&Object.keys(o).length>0,b=o=>{const t={...o||{}};return J.forEach(r=>delete t[r]),t},T=async o=>{const[t,r]=await Promise.all([u.get($(o,G)),u.get($(o,L))]);return{refundFlow:h(t),metadataSchema:h(r)}},z=async(o,t)=>{if(!t||typeof t!="object")return;const r=[],l=h(t.refundFlow);M(l)&&r.push(u.update(`${c.agendaCollection}/${o}/${S}`,G,l));const i=h(t.metadataSchema);M(i)&&r.push(u.update(`${c.agendaCollection}/${o}/${S}`,L,i)),await Promise.all(r)},x=e.computed(()=>{if(!m.value)return[];const o=w.value.trim().toLowerCase();return o?m.value.filter(t=>(t.serviceName||"").toLowerCase().includes(o)):m.value}),I=e.computed(()=>x.value.length>0&&x.value.every(o=>a.value.includes(o.id))),K=()=>{if(I.value){const o=x.value.map(t=>t.id);a.value=a.value.filter(t=>!o.includes(t))}else{const o=x.value.map(r=>r.id),t=new Set([...a.value,...o]);a.value=Array.from(t)}},P=o=>{a.value.includes(o)?a.value=a.value.filter(t=>t!==o):a.value.push(o)},Y=o=>{if(!o)return"??";const t=o.trim().split(/\s+/);return t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()},j=[{fg:"#7c3aed",bg:"rgba(124, 58, 237, 0.12)"},{fg:"#0891b2",bg:"rgba(8, 145, 178, 0.12)"},{fg:"#ea580c",bg:"rgba(234, 88, 12, 0.12)"},{fg:"#16a34a",bg:"rgba(22, 163, 74, 0.12)"},{fg:"#2563eb",bg:"rgba(37, 99, 235, 0.12)"},{fg:"#db2777",bg:"rgba(219, 39, 119, 0.12)"},{fg:"#475569",bg:"rgba(71, 85, 105, 0.12)"}],E=o=>{const t=(o.id||o.serviceName||"").toString();let r=0;for(let l=0;l<t.length;l++)r=r*31+t.charCodeAt(l)>>>0;return j[r%j.length]},Q=o=>{const t=o?.pricingOptions?.[0];return t?.duration?`${t.duration} min`:null},X=o=>{const t=o?.pricingOptions?.[0];return t?.price===void 0||t?.price===null||t?.price===""?null:`${o.currency==="EUR"?"€":"$"}${t.price}`},W=o=>Array.isArray(o?.resources)?o.resources.filter(t=>t?.isActive!==!1).length:0,Z=o=>o.type==="regular"?"Regular":o.type?o.type.charAt(0).toUpperCase()+o.type.slice(1):"Agenda",ee=o=>{d.value=!0,a.value=[o]},_=async()=>{m.value=await u.find(c.agendaCollection),!H("create-agendas","delete-agendas")&&m.value?.length===1&&A(m.value[0].id)},te=async o=>{if(!f("create-agendas"))return;const[t,r]=await Promise.all([u.get(c.agendaCollection,o),T(o)]);if(!t){alert("Agenda not found");return}const l=prompt("Enter name for duplicated agenda",t.serviceName+" (Copy)");if(!l)return;const i={...b(t),serviceName:l},v=(await u.add(c.agendaCollection,i))?.id;v&&await z(v,r),await _()},oe=async o=>{!f("delete-agendas")||!await q("Are you sure you want to delete this agenda? This action cannot be undone.")||(await u.remove(c.agendaCollection,o),await _())},ne=async()=>{if(!m.value)return;const o=m.value.filter(i=>a.value.includes(i.id)),t=await Promise.all(o.map(async i=>{const[g,v]=await Promise.all([u.get(c.agendaCollection,i.id),T(i.id)]);return{...b(g||i),[B]:v}})),r="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(t,null,2)),l=document.createElement("a");l.setAttribute("href",r),l.setAttribute("download","agendas_export.json"),document.body.appendChild(l),l.click(),l.remove(),d.value=!1,a.value=[]},re=async o=>{const t=o.target;if(!t.files||t.files.length===0)return;const l=await t.files[0].text();let i;try{i=JSON.parse(l)}catch{alert("Invalid JSON file");return}if(!Array.isArray(i)){alert("Invalid agendas format");return}for(const g of i){const v=g?.[B],k=(await u.add(c.agendaCollection,b(g)))?.id;k&&await z(k,v)}t.value="",await _()},A=o=>{d.value||(f("edit-agendas")?N(`/edit/${o}`):N(`/edit/${o}/agenda`))};return _(),(o,t)=>{const r=e.resolveComponent("Spinner"),l=e.resolveComponent("EmptyMedia"),i=e.resolveComponent("EmptyTitle"),g=e.resolveComponent("EmptyDescription"),v=e.resolveComponent("EmptyHeader"),p=e.resolveComponent("Button"),k=e.resolveComponent("EmptyContent"),ae=e.resolveComponent("Empty"),le=e.resolveComponent("Input"),F=e.resolveComponent("DropdownMenuTrigger"),V=e.resolveComponent("DropdownMenuItem"),U=e.resolveComponent("DropdownMenuGroup"),O=e.resolveComponent("DropdownMenuContent"),R=e.resolveComponent("DropdownMenu"),se=e.resolveComponent("ButtonGroup"),ie=e.resolveComponent("Checkbox"),de=e.resolveComponent("Badge");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ce,[m.value===null?(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(r,{class:"mx-auto"})])):m.value.length===0?(e.openBlock(),e.createBlock(ae,{key:1},{default:e.withCtx(()=>[e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(l,{variant:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.CalendarX),{class:"size-4-6"})]),_:1}),e.createVNode(i,null,{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("No Agendas Yet",-1)])]),_:1}),e.createVNode(g,null,{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" You haven't created any agenda yet. Get started by creating your first agenda. ",-1)])]),_:1})]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[e.createElementVNode("div",me,[e.createVNode(p,{onClick:t[0]||(t[0]=n=>e.unref(N)("/create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(s.PlusIcon)),t[8]||(t[8]=e.createTextVNode(" Create Agenda ",-1))]),_:1})])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("div",fe,[t[11]||(t[11]=e.createElementVNode("div",null,[e.createElementVNode("h2",{class:"text-3xl font-bold tracking-tight"},"Agendas"),e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-1"}," Manage your bookable services, hours and resources. ")],-1)),e.createElementVNode("div",ge,[e.createElementVNode("div",ve,[e.createVNode(e.unref(s.Search),{class:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none"}),e.createVNode(le,{modelValue:w.value,"onUpdate:modelValue":t[1]||(t[1]=n=>w.value=n),placeholder:"Search agendas...",class:"pl-9 w-full @md:w-64"},null,8,["modelValue"])]),!d.value&&e.unref(f)("create-agendas")?(e.openBlock(),e.createBlock(se,{key:0},{default:e.withCtx(()=>[e.createVNode(p,{onClick:t[2]||(t[2]=n=>e.unref(N)("/create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(s.PlusIcon)),t[9]||(t[9]=e.createTextVNode(" New Agenda ",-1))]),_:1}),e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(F,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(p,{size:"icon","aria-label":"More Options"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(O,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(V,{onClick:t[3]||(t[3]=n=>D.value.click())},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ImportIcon)),t[10]||(t[10]=e.createTextVNode(" Import Agendas... ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),d.value?(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("div",Ce,[e.createVNode(ie,{modelValue:I.value,"onUpdate:modelValue":K},null,8,["modelValue"]),e.createElementVNode("span",Ne,e.toDisplayString(a.value.length)+" of "+e.toDisplayString(x.value.length)+" selected ",1)]),e.createElementVNode("div",ye,[e.createVNode(p,{variant:"ghost",onClick:t[4]||(t[4]=n=>{d.value=!1,a.value=[]})},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(p,{onClick:ne,disabled:a.value.length===0},{default:e.withCtx(()=>[e.createVNode(e.unref(s.Upload)),e.createTextVNode(" Export "+e.toDisplayString(a.value.length||""),1)]),_:1},8,["disabled"])])])):e.createCommentVNode("",!0),x.value.length===0?(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(e.unref(s.Search),{class:"size-8 text-muted-foreground mb-3"}),e.createElementVNode("p",we,'No agendas match "'+e.toDisplayString(w.value)+'"',1),t[13]||(t[13]=e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-1"},"Try a different search term.",-1))])):(e.openBlock(),e.createElementBlock("div",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,class:e.normalizeClass(["group relative flex flex-col overflow-hidden rounded-xl border bg-card shadow-sm transition-all duration-200",{"cursor-pointer":d.value,"ring-2 ring-primary border-primary/40":d.value&&a.value.includes(n.id)}]),onClick:C=>d.value?P(n.id):null},[e.createElementVNode("div",{class:"h-1 w-full",style:e.normalizeStyle({backgroundColor:E(n).fg})},null,4),e.createElementVNode("div",{class:"flex flex-col flex-1 p-5",onClick:C=>!d.value&&A(n.id)},[e.createElementVNode("div",be,[e.createElementVNode("div",{class:"shrink-0 size-12 rounded-lg flex items-center justify-center font-semibold text-sm",style:e.normalizeStyle({backgroundColor:E(n).bg,color:E(n).fg})},e.toDisplayString(Y(n.serviceName)),5),e.createElementVNode("button",{type:"button",class:"flex-1 min-w-0 text-left focus:outline-none",onClick:e.withModifiers(C=>d.value?P(n.id):A(n.id),["stop"])},[e.createElementVNode("h3",Ae,e.toDisplayString(n.serviceName||"Untitled Agenda"),1),e.createElementVNode("div",Se,[e.createVNode(de,{variant:"secondary",class:"text-[10px] font-medium px-1.5 py-0 h-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Z(n)),1)]),_:2},1024),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Be," Click to "+e.toDisplayString(e.unref(f)("edit-agendas")?"edit":"view"),1))])],8,Ee),d.value?(e.openBlock(),e.createElementBlock("div",De,[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center justify-center size-6 rounded-full border-2 transition",a.value.includes(n.id)?"border-primary bg-primary text-primary-foreground":"border-muted-foreground/30"])},[a.value.includes(n.id)?(e.openBlock(),e.createBlock(e.unref(s.CheckCircle2),{key:0,class:"size-4"})):e.createCommentVNode("",!0)],2)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",$e,[e.createElementVNode("div",Me,[e.createElementVNode("div",Te,[e.createVNode(e.unref(s.Clock),{class:"size-3.5"}),t[14]||(t[14]=e.createElementVNode("span",{class:"text-[10px] uppercase tracking-wide font-medium"},"Duration",-1))]),e.createElementVNode("span",ze,e.toDisplayString(Q(n)||"—"),1)]),e.createElementVNode("div",Ie,[e.createElementVNode("div",Pe,[e.createVNode(e.unref(s.DollarSign),{class:"size-3.5"}),t[15]||(t[15]=e.createElementVNode("span",{class:"text-[10px] uppercase tracking-wide font-medium"},"Price",-1))]),e.createElementVNode("span",je,e.toDisplayString(X(n)||"—"),1)]),e.createElementVNode("div",Fe,[e.createElementVNode("div",Ue,[e.createVNode(e.unref(s.Users),{class:"size-3.5"}),t[16]||(t[16]=e.createElementVNode("span",{class:"text-[10px] uppercase tracking-wide font-medium"},"Resources",-1))]),e.createElementVNode("span",Oe,e.toDisplayString(W(n)),1)])])],8,ke),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Re,[e.unref(f)("edit-agendas")?(e.openBlock(),e.createBlock(p,{key:0,variant:"ghost",size:"sm",class:"gap-1.5",onClick:e.withModifiers(C=>e.unref(N)(`/edit/${n.id}`),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(s.CalendarDays),{class:"size-4"}),t[17]||(t[17]=e.createTextVNode(" Edit Agenda ",-1))]),_:1},8,["onClick"])):(e.openBlock(),e.createBlock(p,{key:1,variant:"ghost",size:"sm",class:"gap-1.5",onClick:e.withModifiers(C=>e.unref(N)(`/edit/${n.id}/agenda`),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(s.CalendarDays),{class:"size-4"}),t[18]||(t[18]=e.createTextVNode(" View Agenda ",-1))]),_:1},8,["onClick"])),e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(F,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(p,{variant:"ghost",size:"icon","aria-label":"More Options",onClick:t[5]||(t[5]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createVNode(e.unref(s.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(O,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(U,null,{default:e.withCtx(()=>[e.unref(f)("create-agendas")?(e.openBlock(),e.createBlock(V,{key:0,onClick:C=>te(n.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(s.Copy)),t[19]||(t[19]=e.createTextVNode(" Duplicate Agenda ",-1))]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(e.unref(s.ChevronsLeftRightEllipsis)),t[20]||(t[20]=e.createTextVNode(" API Set-up ",-1))]),_:1}),e.createVNode(V,{onClick:C=>ee(n.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(s.Upload)),t[21]||(t[21]=e.createTextVNode(" Export Agenda ",-1))]),_:1},8,["onClick"]),e.unref(f)("delete-agendas")?(e.openBlock(),e.createBlock(V,{key:1,variant:"destructive",onClick:C=>oe(n.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(s.Trash2Icon)),t[22]||(t[22]=e.createTextVNode(" Remove Agenda ",-1))]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)]))],10,_e))),128))]))]))]),e.createElementVNode("input",{type:"file",ref_key:"importAgendasInput",ref:D,class:"hidden",accept:".json,application/json",onChange:re},null,544)],64)}}});exports.default=Ge;
@@ -1,92 +1,92 @@
1
- import { defineComponent as Ee, ref as M, computed as Z, resolveComponent as u, openBlock as c, createElementBlock as g, Fragment as ee, createElementVNode as o, createVNode as n, createBlock as $, withCtx as s, unref as a, createTextVNode as f, createCommentVNode as k, toDisplayString as v, renderList as De, normalizeClass as te, normalizeStyle as ne, withModifiers as j } from "vue";
2
- import { useModule as Me, useFirebaseIntegration as ze, useModuleRoute as Ie, useConfirmation as Ne, useModulePermissions as Pe, useModuleBreadcrumbs as je } from "@oneclick.dev/cms-kit";
3
- import { CalendarX as Fe, PlusIcon as oe, Search as se, MoreHorizontalIcon as le, ImportIcon as Te, Upload as ae, CheckCircle2 as Ve, Clock as Be, DollarSign as Ue, Users as Oe, CalendarDays as ie, Copy as Re, ChevronsLeftRightEllipsis as Ge, Trash2Icon as Le } from "lucide-vue-next";
4
- const He = { class: "container @container mx-auto py-8" }, Je = {
1
+ import { defineComponent as De, ref as M, computed as Z, resolveComponent as u, openBlock as c, createElementBlock as g, Fragment as ee, createElementVNode as o, createVNode as n, createBlock as $, withCtx as s, unref as a, createTextVNode as f, createCommentVNode as k, toDisplayString as v, renderList as Me, normalizeClass as te, normalizeStyle as ne, withModifiers as j } from "vue";
2
+ import { useModule as ze, useFirebaseIntegration as Ie, useModuleRoute as Ne, useConfirmation as Pe, useModulePermissions as je, useModuleBreadcrumbs as Fe } from "@oneclick.dev/cms-kit";
3
+ import { CalendarX as Te, PlusIcon as oe, Search as se, MoreHorizontalIcon as le, ImportIcon as Ve, Upload as ae, CheckCircle2 as Be, Clock as Ue, DollarSign as Oe, Users as Re, CalendarDays as ie, Copy as Ge, ChevronsLeftRightEllipsis as Le, Trash2Icon as He } from "lucide-vue-next";
4
+ const Je = { class: "container @container mx-auto py-8" }, Ye = {
5
5
  key: 0,
6
6
  class: "flex justify-center py-24"
7
- }, Ye = { class: "flex gap-2" }, qe = { key: 2 }, Ke = { class: "flex flex-col gap-4 mb-6 @md:flex-row @md:items-end @md:justify-between" }, Qe = { class: "flex flex-wrap items-center gap-2" }, Xe = { class: "relative" }, We = {
7
+ }, qe = { class: "flex gap-2" }, Ke = { key: 2 }, Qe = { class: "flex flex-col gap-4 mb-6 @md:flex-row @md:items-end @md:justify-between" }, Xe = { class: "flex flex-wrap items-center gap-2" }, We = { class: "relative" }, Ze = {
8
8
  key: 0,
9
9
  class: "flex flex-wrap items-center justify-between gap-3 mb-4 px-4 py-3 rounded-lg border bg-muted/40"
10
- }, Ze = { class: "flex items-center gap-3" }, et = { class: "text-sm font-medium" }, tt = { class: "flex items-center gap-2" }, nt = {
10
+ }, et = { class: "flex items-center gap-3" }, tt = { class: "text-sm font-medium" }, nt = { class: "flex items-center gap-2" }, ot = {
11
11
  key: 1,
12
12
  class: "flex flex-col items-center justify-center py-16 text-center border border-dashed rounded-lg"
13
- }, ot = { class: "font-medium" }, st = {
13
+ }, st = { class: "font-medium" }, lt = {
14
14
  key: 2,
15
15
  class: "grid gap-4 @md:grid-cols-2 @3xl:grid-cols-3"
16
- }, lt = ["onClick"], at = ["onClick"], it = { class: "flex items-start gap-3" }, rt = ["onClick"], dt = { class: "text-base font-semibold leading-tight line-clamp-1" }, ct = { class: "flex items-center gap-2 mt-1" }, ut = {
16
+ }, at = ["onClick"], it = ["onClick"], rt = { class: "flex items-start gap-3" }, dt = ["onClick"], ct = { class: "text-base font-semibold leading-tight line-clamp-1" }, ut = { class: "flex items-center gap-2 mt-1" }, pt = {
17
17
  key: 0,
18
18
  class: "text-xs text-muted-foreground cursor-pointer"
19
- }, pt = {
19
+ }, mt = {
20
20
  key: 0,
21
21
  class: "shrink-0"
22
- }, mt = { class: "grid grid-cols-3 gap-2 mt-5" }, ft = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, gt = { class: "flex items-center gap-1 text-muted-foreground" }, vt = { class: "text-sm font-semibold" }, yt = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, _t = { class: "flex items-center gap-1 text-muted-foreground" }, xt = { class: "text-sm font-semibold" }, bt = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, wt = { class: "flex items-center gap-1 text-muted-foreground" }, Ct = { class: "text-sm font-semibold" }, ht = {
22
+ }, ft = { class: "grid grid-cols-3 gap-2 mt-5" }, gt = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, vt = { class: "flex items-center gap-1 text-muted-foreground" }, yt = { class: "text-sm font-semibold" }, _t = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, xt = { class: "flex items-center gap-1 text-muted-foreground" }, bt = { class: "text-sm font-semibold" }, wt = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, Ct = { class: "flex items-center gap-1 text-muted-foreground" }, ht = { class: "text-sm font-semibold" }, kt = {
23
23
  key: 0,
24
24
  class: "flex items-center justify-between gap-2 px-5 py-3 border-t bg-muted/20"
25
- }, V = "privateSettings", re = "refundFlow", de = "metadataSchema", B = "_privateSettings", Et = /* @__PURE__ */ Ee({
25
+ }, B = "privateSettings", re = "refundFlow", de = "metadataSchema", U = "_privateSettings", Dt = /* @__PURE__ */ De({
26
26
  __name: "Overview",
27
- setup(kt) {
28
- const { config: y } = Me(), _ = ze(y.project), { navigateTo: E } = Ie(), { confirm: ce } = Ne(), { hasPermission: b } = Pe();
29
- je(() => []);
30
- const w = M(null), z = M(""), m = M(!1), r = M([]), U = M("importAgendasInput"), ue = [
27
+ setup(At) {
28
+ const { config: y } = ze(), _ = Ie(y.project), { navigateTo: E } = Ne(), { confirm: ce } = Pe(), { hasPermission: w, hasAnyPermission: ue } = je();
29
+ Fe(() => []);
30
+ const x = M(null), z = M(""), m = M(!1), r = M([]), O = M("importAgendasInput"), pe = [
31
31
  "id",
32
- B,
32
+ U,
33
33
  "metadataSchema",
34
34
  "refundFlow",
35
35
  "refundFlowEnabled",
36
36
  "refundDialog"
37
- ], O = (t, e) => `${y.agendaCollection}/${t}/${V}/${e}`, I = (t) => {
37
+ ], R = (t, e) => `${y.agendaCollection}/${t}/${B}/${e}`, I = (t) => {
38
38
  if (!t || typeof t != "object") return null;
39
39
  const { id: e, ...i } = t;
40
40
  return i;
41
- }, R = (t) => !!t && typeof t == "object" && Object.keys(t).length > 0, F = (t) => {
41
+ }, G = (t) => !!t && typeof t == "object" && Object.keys(t).length > 0, F = (t) => {
42
42
  const e = { ...t || {} };
43
- return ue.forEach((i) => delete e[i]), e;
44
- }, G = async (t) => {
43
+ return pe.forEach((i) => delete e[i]), e;
44
+ }, L = async (t) => {
45
45
  const [e, i] = await Promise.all([
46
- _.get(O(t, re)),
47
- _.get(O(t, de))
46
+ _.get(R(t, re)),
47
+ _.get(R(t, de))
48
48
  ]);
49
49
  return {
50
50
  refundFlow: I(e),
51
51
  metadataSchema: I(i)
52
52
  };
53
- }, L = async (t, e) => {
53
+ }, H = async (t, e) => {
54
54
  if (!e || typeof e != "object") return;
55
55
  const i = [], d = I(e.refundFlow);
56
- R(d) && i.push(_.update(
57
- `${y.agendaCollection}/${t}/${V}`,
56
+ G(d) && i.push(_.update(
57
+ `${y.agendaCollection}/${t}/${B}`,
58
58
  re,
59
59
  d
60
60
  ));
61
61
  const p = I(e.metadataSchema);
62
- R(p) && i.push(_.update(
63
- `${y.agendaCollection}/${t}/${V}`,
62
+ G(p) && i.push(_.update(
63
+ `${y.agendaCollection}/${t}/${B}`,
64
64
  de,
65
65
  p
66
66
  )), await Promise.all(i);
67
67
  }, A = Z(() => {
68
- if (!w.value) return [];
68
+ if (!x.value) return [];
69
69
  const t = z.value.trim().toLowerCase();
70
- return t ? w.value.filter(
70
+ return t ? x.value.filter(
71
71
  (e) => (e.serviceName || "").toLowerCase().includes(t)
72
- ) : w.value;
73
- }), H = Z(
72
+ ) : x.value;
73
+ }), J = Z(
74
74
  () => A.value.length > 0 && A.value.every((t) => r.value.includes(t.id))
75
- ), pe = () => {
76
- if (H.value) {
75
+ ), me = () => {
76
+ if (J.value) {
77
77
  const t = A.value.map((e) => e.id);
78
78
  r.value = r.value.filter((e) => !t.includes(e));
79
79
  } else {
80
80
  const t = A.value.map((i) => i.id), e = /* @__PURE__ */ new Set([...r.value, ...t]);
81
81
  r.value = Array.from(e);
82
82
  }
83
- }, J = (t) => {
83
+ }, Y = (t) => {
84
84
  r.value.includes(t) ? r.value = r.value.filter((e) => e !== t) : r.value.push(t);
85
- }, me = (t) => {
85
+ }, fe = (t) => {
86
86
  if (!t) return "??";
87
87
  const e = t.trim().split(/\s+/);
88
88
  return e.length === 1 ? e[0].slice(0, 2).toUpperCase() : (e[0][0] + e[e.length - 1][0]).toUpperCase();
89
- }, Y = [
89
+ }, q = [
90
90
  { fg: "#7c3aed", bg: "rgba(124, 58, 237, 0.12)" },
91
91
  // violet
92
92
  { fg: "#0891b2", bg: "rgba(8, 145, 178, 0.12)" },
@@ -105,22 +105,22 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
105
105
  const e = (t.id || t.serviceName || "").toString();
106
106
  let i = 0;
107
107
  for (let d = 0; d < e.length; d++) i = i * 31 + e.charCodeAt(d) >>> 0;
108
- return Y[i % Y.length];
109
- }, fe = (t) => {
108
+ return q[i % q.length];
109
+ }, ge = (t) => {
110
110
  const e = t?.pricingOptions?.[0];
111
111
  return e?.duration ? `${e.duration} min` : null;
112
- }, ge = (t) => {
112
+ }, ve = (t) => {
113
113
  const e = t?.pricingOptions?.[0];
114
114
  return e?.price === void 0 || e?.price === null || e?.price === "" ? null : `${t.currency === "EUR" ? "€" : "$"}${e.price}`;
115
- }, ve = (t) => Array.isArray(t?.resources) ? t.resources.filter((e) => e?.isActive !== !1).length : 0, ye = (t) => t.type === "regular" ? "Regular" : t.type ? t.type.charAt(0).toUpperCase() + t.type.slice(1) : "Agenda", _e = (t) => {
115
+ }, ye = (t) => Array.isArray(t?.resources) ? t.resources.filter((e) => e?.isActive !== !1).length : 0, _e = (t) => t.type === "regular" ? "Regular" : t.type ? t.type.charAt(0).toUpperCase() + t.type.slice(1) : "Agenda", xe = (t) => {
116
116
  m.value = !0, r.value = [t];
117
117
  }, N = async () => {
118
- w.value = await _.find(y.agendaCollection);
119
- }, xe = async (t) => {
120
- if (!b("create-agendas")) return;
118
+ x.value = await _.find(y.agendaCollection), !ue("create-agendas", "delete-agendas") && x.value?.length === 1 && V(x.value[0].id);
119
+ }, be = async (t) => {
120
+ if (!w("create-agendas")) return;
121
121
  const [e, i] = await Promise.all([
122
122
  _.get(y.agendaCollection, t),
123
- G(t)
123
+ L(t)
124
124
  ]);
125
125
  if (!e) {
126
126
  alert("Agenda not found");
@@ -130,23 +130,23 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
130
130
  if (!d)
131
131
  return;
132
132
  const p = { ...F(e), serviceName: d }, h = (await _.add(y.agendaCollection, p))?.id;
133
- h && await L(h, i), await N();
134
- }, be = async (t) => {
135
- !b("delete-agendas") || !await ce("Are you sure you want to delete this agenda? This action cannot be undone.") || (await _.remove(y.agendaCollection, t), await N());
136
- }, we = async () => {
137
- if (!w.value) return;
138
- const t = w.value.filter((p) => r.value.includes(p.id)), e = await Promise.all(t.map(async (p) => {
133
+ h && await H(h, i), await N();
134
+ }, we = async (t) => {
135
+ !w("delete-agendas") || !await ce("Are you sure you want to delete this agenda? This action cannot be undone.") || (await _.remove(y.agendaCollection, t), await N());
136
+ }, Ce = async () => {
137
+ if (!x.value) return;
138
+ const t = x.value.filter((p) => r.value.includes(p.id)), e = await Promise.all(t.map(async (p) => {
139
139
  const [C, h] = await Promise.all([
140
140
  _.get(y.agendaCollection, p.id),
141
- G(p.id)
141
+ L(p.id)
142
142
  ]);
143
143
  return {
144
144
  ...F(C || p),
145
- [B]: h
145
+ [U]: h
146
146
  };
147
147
  })), i = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(e, null, 2)), d = document.createElement("a");
148
148
  d.setAttribute("href", i), d.setAttribute("download", "agendas_export.json"), document.body.appendChild(d), d.click(), d.remove(), m.value = !1, r.value = [];
149
- }, Ce = async (t) => {
149
+ }, he = async (t) => {
150
150
  const e = t.target;
151
151
  if (!e.files || e.files.length === 0)
152
152
  return;
@@ -163,26 +163,26 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
163
163
  return;
164
164
  }
165
165
  for (const C of p) {
166
- const h = C?.[B], P = (await _.add(y.agendaCollection, F(C)))?.id;
167
- P && await L(P, h);
166
+ const h = C?.[U], P = (await _.add(y.agendaCollection, F(C)))?.id;
167
+ P && await H(P, h);
168
168
  }
169
169
  e.value = "", await N();
170
- }, q = (t) => {
171
- m.value || (b("edit-agendas") ? E(`/edit/${t}`) : E(`/edit/${t}/agenda`));
170
+ }, V = (t) => {
171
+ m.value || (w("edit-agendas") ? E(`/edit/${t}`) : E(`/edit/${t}/agenda`));
172
172
  };
173
173
  return N(), (t, e) => {
174
- const i = u("Spinner"), d = u("EmptyMedia"), p = u("EmptyTitle"), C = u("EmptyDescription"), h = u("EmptyHeader"), x = u("Button"), P = u("EmptyContent"), he = u("Empty"), ke = u("Input"), K = u("DropdownMenuTrigger"), D = u("DropdownMenuItem"), Q = u("DropdownMenuGroup"), X = u("DropdownMenuContent"), W = u("DropdownMenu"), Ae = u("ButtonGroup"), Se = u("Checkbox"), $e = u("Badge");
174
+ const i = u("Spinner"), d = u("EmptyMedia"), p = u("EmptyTitle"), C = u("EmptyDescription"), h = u("EmptyHeader"), b = u("Button"), P = u("EmptyContent"), ke = u("Empty"), Ae = u("Input"), K = u("DropdownMenuTrigger"), D = u("DropdownMenuItem"), Q = u("DropdownMenuGroup"), X = u("DropdownMenuContent"), W = u("DropdownMenu"), Se = u("ButtonGroup"), $e = u("Checkbox"), Ee = u("Badge");
175
175
  return c(), g(ee, null, [
176
- o("div", He, [
177
- w.value === null ? (c(), g("div", Je, [
176
+ o("div", Je, [
177
+ x.value === null ? (c(), g("div", Ye, [
178
178
  n(i, { class: "mx-auto" })
179
- ])) : w.value.length === 0 ? (c(), $(he, { key: 1 }, {
179
+ ])) : x.value.length === 0 ? (c(), $(ke, { key: 1 }, {
180
180
  default: s(() => [
181
181
  n(h, null, {
182
182
  default: s(() => [
183
183
  n(d, { variant: "icon" }, {
184
184
  default: s(() => [
185
- n(a(Fe), { class: "size-4-6" })
185
+ n(a(Te), { class: "size-4-6" })
186
186
  ]),
187
187
  _: 1
188
188
  }),
@@ -203,8 +203,8 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
203
203
  }),
204
204
  n(P, null, {
205
205
  default: s(() => [
206
- o("div", Ye, [
207
- n(x, {
206
+ o("div", qe, [
207
+ n(b, {
208
208
  onClick: e[0] || (e[0] = (l) => a(E)("/create"))
209
209
  }, {
210
210
  default: s(() => [
@@ -219,25 +219,25 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
219
219
  })
220
220
  ]),
221
221
  _: 1
222
- })) : (c(), g("div", qe, [
223
- o("div", Ke, [
222
+ })) : (c(), g("div", Ke, [
223
+ o("div", Qe, [
224
224
  e[11] || (e[11] = o("div", null, [
225
225
  o("h2", { class: "text-3xl font-bold tracking-tight" }, "Agendas"),
226
226
  o("p", { class: "text-sm text-muted-foreground mt-1" }, " Manage your bookable services, hours and resources. ")
227
227
  ], -1)),
228
- o("div", Qe, [
229
- o("div", Xe, [
228
+ o("div", Xe, [
229
+ o("div", We, [
230
230
  n(a(se), { class: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
231
- n(ke, {
231
+ n(Ae, {
232
232
  modelValue: z.value,
233
233
  "onUpdate:modelValue": e[1] || (e[1] = (l) => z.value = l),
234
234
  placeholder: "Search agendas...",
235
235
  class: "pl-9 w-full @md:w-64"
236
236
  }, null, 8, ["modelValue"])
237
237
  ]),
238
- !m.value && a(b)("create-agendas") ? (c(), $(Ae, { key: 0 }, {
238
+ !m.value && a(w)("create-agendas") ? (c(), $(Se, { key: 0 }, {
239
239
  default: s(() => [
240
- n(x, {
240
+ n(b, {
241
241
  onClick: e[2] || (e[2] = (l) => a(E)("/create"))
242
242
  }, {
243
243
  default: s(() => [
@@ -250,7 +250,7 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
250
250
  default: s(() => [
251
251
  n(K, { "as-child": "" }, {
252
252
  default: s(() => [
253
- n(x, {
253
+ n(b, {
254
254
  size: "icon",
255
255
  "aria-label": "More Options"
256
256
  }, {
@@ -270,10 +270,10 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
270
270
  n(Q, null, {
271
271
  default: s(() => [
272
272
  n(D, {
273
- onClick: e[3] || (e[3] = (l) => U.value.click())
273
+ onClick: e[3] || (e[3] = (l) => O.value.click())
274
274
  }, {
275
275
  default: s(() => [
276
- n(a(Te)),
276
+ n(a(Ve)),
277
277
  e[10] || (e[10] = f(" Import Agendas... ", -1))
278
278
  ]),
279
279
  _: 1
@@ -292,16 +292,16 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
292
292
  })) : k("", !0)
293
293
  ])
294
294
  ]),
295
- m.value ? (c(), g("div", We, [
296
- o("div", Ze, [
297
- n(Se, {
298
- modelValue: H.value,
299
- "onUpdate:modelValue": pe
295
+ m.value ? (c(), g("div", Ze, [
296
+ o("div", et, [
297
+ n($e, {
298
+ modelValue: J.value,
299
+ "onUpdate:modelValue": me
300
300
  }, null, 8, ["modelValue"]),
301
- o("span", et, v(r.value.length) + " of " + v(A.value.length) + " selected ", 1)
301
+ o("span", tt, v(r.value.length) + " of " + v(A.value.length) + " selected ", 1)
302
302
  ]),
303
- o("div", tt, [
304
- n(x, {
303
+ o("div", nt, [
304
+ n(b, {
305
305
  variant: "ghost",
306
306
  onClick: e[4] || (e[4] = (l) => {
307
307
  m.value = !1, r.value = [];
@@ -312,8 +312,8 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
312
312
  ])]),
313
313
  _: 1
314
314
  }),
315
- n(x, {
316
- onClick: we,
315
+ n(b, {
316
+ onClick: Ce,
317
317
  disabled: r.value.length === 0
318
318
  }, {
319
319
  default: s(() => [
@@ -324,18 +324,18 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
324
324
  }, 8, ["disabled"])
325
325
  ])
326
326
  ])) : k("", !0),
327
- A.value.length === 0 ? (c(), g("div", nt, [
327
+ A.value.length === 0 ? (c(), g("div", ot, [
328
328
  n(a(se), { class: "size-8 text-muted-foreground mb-3" }),
329
- o("p", ot, 'No agendas match "' + v(z.value) + '"', 1),
329
+ o("p", st, 'No agendas match "' + v(z.value) + '"', 1),
330
330
  e[13] || (e[13] = o("p", { class: "text-sm text-muted-foreground mt-1" }, "Try a different search term.", -1))
331
- ])) : (c(), g("div", st, [
332
- (c(!0), g(ee, null, De(A.value, (l) => (c(), g("div", {
331
+ ])) : (c(), g("div", lt, [
332
+ (c(!0), g(ee, null, Me(A.value, (l) => (c(), g("div", {
333
333
  key: l.id,
334
334
  class: te(["group relative flex flex-col overflow-hidden rounded-xl border bg-card shadow-sm transition-all duration-200", {
335
335
  "cursor-pointer": m.value,
336
336
  "ring-2 ring-primary border-primary/40": m.value && r.value.includes(l.id)
337
337
  }]),
338
- onClick: (S) => m.value ? J(l.id) : null
338
+ onClick: (S) => m.value ? Y(l.id) : null
339
339
  }, [
340
340
  o("div", {
341
341
  class: "h-1 w-full",
@@ -343,72 +343,72 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
343
343
  }, null, 4),
344
344
  o("div", {
345
345
  class: "flex flex-col flex-1 p-5",
346
- onClick: (S) => !m.value && q(l.id)
346
+ onClick: (S) => !m.value && V(l.id)
347
347
  }, [
348
- o("div", it, [
348
+ o("div", rt, [
349
349
  o("div", {
350
350
  class: "shrink-0 size-12 rounded-lg flex items-center justify-center font-semibold text-sm",
351
351
  style: ne({
352
352
  backgroundColor: T(l).bg,
353
353
  color: T(l).fg
354
354
  })
355
- }, v(me(l.serviceName)), 5),
355
+ }, v(fe(l.serviceName)), 5),
356
356
  o("button", {
357
357
  type: "button",
358
358
  class: "flex-1 min-w-0 text-left focus:outline-none",
359
- onClick: j((S) => m.value ? J(l.id) : q(l.id), ["stop"])
359
+ onClick: j((S) => m.value ? Y(l.id) : V(l.id), ["stop"])
360
360
  }, [
361
- o("h3", dt, v(l.serviceName || "Untitled Agenda"), 1),
362
- o("div", ct, [
363
- n($e, {
361
+ o("h3", ct, v(l.serviceName || "Untitled Agenda"), 1),
362
+ o("div", ut, [
363
+ n(Ee, {
364
364
  variant: "secondary",
365
365
  class: "text-[10px] font-medium px-1.5 py-0 h-4"
366
366
  }, {
367
367
  default: s(() => [
368
- f(v(ye(l)), 1)
368
+ f(v(_e(l)), 1)
369
369
  ]),
370
370
  _: 2
371
371
  }, 1024),
372
- m.value ? k("", !0) : (c(), g("span", ut, " Click to " + v(a(b)("edit-agendas") ? "edit" : "view"), 1))
372
+ m.value ? k("", !0) : (c(), g("span", pt, " Click to " + v(a(w)("edit-agendas") ? "edit" : "view"), 1))
373
373
  ])
374
- ], 8, rt),
375
- m.value ? (c(), g("div", pt, [
374
+ ], 8, dt),
375
+ m.value ? (c(), g("div", mt, [
376
376
  o("div", {
377
377
  class: te(["flex items-center justify-center size-6 rounded-full border-2 transition", r.value.includes(l.id) ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground/30"])
378
378
  }, [
379
- r.value.includes(l.id) ? (c(), $(a(Ve), {
379
+ r.value.includes(l.id) ? (c(), $(a(Be), {
380
380
  key: 0,
381
381
  class: "size-4"
382
382
  })) : k("", !0)
383
383
  ], 2)
384
384
  ])) : k("", !0)
385
385
  ]),
386
- o("div", mt, [
387
- o("div", ft, [
388
- o("div", gt, [
389
- n(a(Be), { class: "size-3.5" }),
386
+ o("div", ft, [
387
+ o("div", gt, [
388
+ o("div", vt, [
389
+ n(a(Ue), { class: "size-3.5" }),
390
390
  e[14] || (e[14] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Duration", -1))
391
391
  ]),
392
- o("span", vt, v(fe(l) || "—"), 1)
392
+ o("span", yt, v(ge(l) || "—"), 1)
393
393
  ]),
394
- o("div", yt, [
395
- o("div", _t, [
396
- n(a(Ue), { class: "size-3.5" }),
394
+ o("div", _t, [
395
+ o("div", xt, [
396
+ n(a(Oe), { class: "size-3.5" }),
397
397
  e[15] || (e[15] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Price", -1))
398
398
  ]),
399
- o("span", xt, v(ge(l) || "—"), 1)
399
+ o("span", bt, v(ve(l) || "—"), 1)
400
400
  ]),
401
- o("div", bt, [
402
- o("div", wt, [
403
- n(a(Oe), { class: "size-3.5" }),
401
+ o("div", wt, [
402
+ o("div", Ct, [
403
+ n(a(Re), { class: "size-3.5" }),
404
404
  e[16] || (e[16] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Resources", -1))
405
405
  ]),
406
- o("span", Ct, v(ve(l)), 1)
406
+ o("span", ht, v(ye(l)), 1)
407
407
  ])
408
408
  ])
409
- ], 8, at),
410
- m.value ? k("", !0) : (c(), g("div", ht, [
411
- a(b)("edit-agendas") ? (c(), $(x, {
409
+ ], 8, it),
410
+ m.value ? k("", !0) : (c(), g("div", kt, [
411
+ a(w)("edit-agendas") ? (c(), $(b, {
412
412
  key: 0,
413
413
  variant: "ghost",
414
414
  size: "sm",
@@ -420,7 +420,7 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
420
420
  e[17] || (e[17] = f(" Edit Agenda ", -1))
421
421
  ]),
422
422
  _: 1
423
- }, 8, ["onClick"])) : (c(), $(x, {
423
+ }, 8, ["onClick"])) : (c(), $(b, {
424
424
  key: 1,
425
425
  variant: "ghost",
426
426
  size: "sm",
@@ -437,7 +437,7 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
437
437
  default: s(() => [
438
438
  n(K, { "as-child": "" }, {
439
439
  default: s(() => [
440
- n(x, {
440
+ n(b, {
441
441
  variant: "ghost",
442
442
  size: "icon",
443
443
  "aria-label": "More Options",
@@ -459,25 +459,25 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
459
459
  default: s(() => [
460
460
  n(Q, null, {
461
461
  default: s(() => [
462
- a(b)("create-agendas") ? (c(), $(D, {
462
+ a(w)("create-agendas") ? (c(), $(D, {
463
463
  key: 0,
464
- onClick: (S) => xe(l.id)
464
+ onClick: (S) => be(l.id)
465
465
  }, {
466
466
  default: s(() => [
467
- n(a(Re)),
467
+ n(a(Ge)),
468
468
  e[19] || (e[19] = f(" Duplicate Agenda ", -1))
469
469
  ]),
470
470
  _: 1
471
471
  }, 8, ["onClick"])) : k("", !0),
472
472
  n(D, null, {
473
473
  default: s(() => [
474
- n(a(Ge)),
474
+ n(a(Le)),
475
475
  e[20] || (e[20] = f(" API Set-up ", -1))
476
476
  ]),
477
477
  _: 1
478
478
  }),
479
479
  n(D, {
480
- onClick: (S) => _e(l.id)
480
+ onClick: (S) => xe(l.id)
481
481
  }, {
482
482
  default: s(() => [
483
483
  n(a(ae)),
@@ -485,13 +485,13 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
485
485
  ]),
486
486
  _: 1
487
487
  }, 8, ["onClick"]),
488
- a(b)("delete-agendas") ? (c(), $(D, {
488
+ a(w)("delete-agendas") ? (c(), $(D, {
489
489
  key: 1,
490
490
  variant: "destructive",
491
- onClick: (S) => be(l.id)
491
+ onClick: (S) => we(l.id)
492
492
  }, {
493
493
  default: s(() => [
494
- n(a(Le)),
494
+ n(a(He)),
495
495
  e[22] || (e[22] = f(" Remove Agenda ", -1))
496
496
  ]),
497
497
  _: 1
@@ -506,22 +506,22 @@ const He = { class: "container @container mx-auto py-8" }, Je = {
506
506
  _: 2
507
507
  }, 1024)
508
508
  ]))
509
- ], 10, lt))), 128))
509
+ ], 10, at))), 128))
510
510
  ]))
511
511
  ]))
512
512
  ]),
513
513
  o("input", {
514
514
  type: "file",
515
515
  ref_key: "importAgendasInput",
516
- ref: U,
516
+ ref: O,
517
517
  class: "hidden",
518
518
  accept: ".json,application/json",
519
- onChange: Ce
519
+ onChange: he
520
520
  }, null, 544)
521
521
  ], 64);
522
522
  };
523
523
  }
524
524
  });
525
525
  export {
526
- Et as default
526
+ Dt as default
527
527
  };