@oneclick.dev/cms-core-modules 0.0.61 → 0.0.63

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 (46) hide show
  1. package/dist/{ContentEditor-BAepN3Yd.js → ContentEditor-DKFCmfOs.js} +1 -1
  2. package/dist/{ContentEditor-BPjWW3d1.mjs → ContentEditor-owdOIage.mjs} +1 -1
  3. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DRVxQswt.js +1 -0
  4. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-BJitmbPE.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-DkgDWC2i.mjs} +130 -125
  5. package/dist/{Overview-DtWvKB3W.mjs → Overview-DiBYtvEX.mjs} +124 -119
  6. package/dist/Overview-qP1guKjx.js +1 -0
  7. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs +2332 -0
  8. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js +349 -0
  9. package/dist/{TableView-_2cP-w_7.js → TableView-BqhL_P45.js} +100 -100
  10. package/dist/{TableView-DlhHyuUZ.mjs → TableView-Dbl8qcUy.mjs} +14991 -14728
  11. package/dist/agenda-DFNJ8C1N.mjs +1136 -0
  12. package/dist/agenda-MjkwV63A.js +1 -0
  13. package/dist/floating-ui.dom-CBBY0Ism.js +1 -0
  14. package/dist/floating-ui.dom-xfqXu4GA.mjs +1138 -0
  15. package/dist/{index-DTago6vW-Bhr8E1Y6.js → index-CgfL8UKf-DAN7RkzR.js} +10 -10
  16. package/dist/{index-DTago6vW-CnomHQ_S.mjs → index-CgfL8UKf-DUUg9HDA.mjs} +904 -875
  17. package/dist/index-DBDq-h4j.js +245 -0
  18. package/dist/{index-BDaVYdkD.mjs → index-X0L4AHBR.mjs} +2406 -2394
  19. package/dist/index-YMaY4uuk-BgpTtr73.js +1 -0
  20. package/dist/{index-YMaY4uuk-BshejgNP.mjs → index-YMaY4uuk-C_xV5K9Z.mjs} +13 -14
  21. package/dist/index.cjs.js +1 -1
  22. package/dist/index.mjs +6 -6
  23. package/dist/orders-Bqa3Z3tH.mjs +356 -0
  24. package/dist/orders-D5GJOZXN.js +1 -0
  25. package/dist/src/appointments/components/edit/EventDialog/ApproveReservationDialog.vue.d.ts +8 -0
  26. package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +39 -9
  27. package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +2 -2
  28. package/dist/src/appointments/components/edit/EventDialog/RejectReservationDialog.vue.d.ts +8 -0
  29. package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +36 -8
  30. package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +46 -9
  31. package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +19 -0
  32. package/dist/src/appointments/pages/edit/orders.vue.d.ts +39 -9
  33. package/package.json +1 -1
  34. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-D50uTpZY.js +0 -1
  35. package/dist/Overview-B_99j5eA.js +0 -1
  36. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CI8YgHdU.js +0 -345
  37. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-P-MWwcVh.mjs +0 -2093
  38. package/dist/agenda-D81m29_4.mjs +0 -1135
  39. package/dist/agenda-uzPPxgsW.js +0 -1
  40. package/dist/floating-ui.dom-C82nbomj.js +0 -1
  41. package/dist/floating-ui.dom-ouSgPqty.mjs +0 -1133
  42. package/dist/index-DfV8-6ON.js +0 -245
  43. package/dist/index-YMaY4uuk-BxVT7IpO.js +0 -1
  44. package/dist/orders-Bh8w0ueq.mjs +0 -346
  45. package/dist/orders-Dt0zMz97.js +0 -1
  46. package/dist/src/appointments/components/edit/EventDialog/ResendConfirmationDialog.vue.d.ts +0 -4
@@ -0,0 +1,349 @@
1
+ "use strict";const e=require("vue"),M=require("lucide-vue-next"),I=require("@oneclick.dev/cms-kit"),z=require("./index-ijdf0d9-.js");function T(o){return Array.isArray?Array.isArray(o):he(o)==="[object Array]"}function $e(o){if(typeof o=="string")return o;let t=o+"";return t=="0"&&1/o==-1/0?"-0":t}function Fe(o){return o==null?"":$e(o)}function R(o){return typeof o=="string"}function ve(o){return typeof o=="number"}function Se(o){return o===!0||o===!1||Re(o)&&he(o)=="[object Boolean]"}function ge(o){return typeof o=="object"}function Re(o){return ge(o)&&o!==null}function F(o){return o!=null}function Z(o){return!o.trim().length}function he(o){return o==null?o===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(o)}const Ie="Incorrect 'index' type",Te=o=>`Invalid value for key ${o}`,je=o=>`Pattern length exceeds max of ${o}.`,Oe=o=>`Missing ${o} property in key`,Le=o=>`Property 'weight' in key '${o}' must be a positive integer`,ce=Object.prototype.hasOwnProperty;class Pe{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(a=>{let i=xe(a);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(a=>{a.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function xe(o){let t=null,n=null,a=null,i=1,l=null;if(R(o)||T(o))a=o,t=ue(o),n=q(o);else{if(!ce.call(o,"name"))throw new Error(Oe("name"));const r=o.name;if(a=r,ce.call(o,"weight")&&(i=o.weight,i<=0))throw new Error(Le(r));t=ue(r),n=q(r),l=o.getFn}return{path:t,id:n,weight:i,src:a,getFn:l}}function ue(o){return T(o)?o:o.split(".")}function q(o){return T(o)?o.join("."):o}function ze(o,t){let n=[],a=!1;const i=(l,r,c)=>{if(F(l))if(!r[c])n.push(l);else{let d=r[c];const s=l[d];if(!F(s))return;if(c===r.length-1&&(R(s)||ve(s)||Se(s)))n.push(Fe(s));else if(T(s)){a=!0;for(let p=0,v=s.length;p<v;p+=1)i(s[p],r,c+1)}else r.length&&i(s,r,c+1)}};return i(o,R(t)?t.split("."):t,0),a?n:n[0]}const Ue={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},He={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(o,t)=>o.score===t.score?o.idx<t.idx?-1:1:o.score<t.score?-1:1},We={location:0,threshold:.6,distance:100},Ke={useExtendedSearch:!1,getFn:ze,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var h={...He,...Ue,...We,...Ke};const Ge=/[^ ]+/g;function Ye(o=1,t=3){const n=new Map,a=Math.pow(10,t);return{get(i){const l=i.match(Ge).length;if(n.has(l))return n.get(l);const r=1/Math.pow(l,.5*o),c=parseFloat(Math.round(r*a)/a);return n.set(l,c),c},clear(){n.clear()}}}class ae{constructor({getFn:t=h.getFn,fieldNormWeight:n=h.fieldNormWeight}={}){this.norm=Ye(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,a)=>{this._keysMap[n.id]=a})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,R(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();R(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,a=this.size();n<a;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!F(t)||Z(t))return;let a={v:t,i:n,n:this.norm.get(t)};this.records.push(a)}_addObject(t,n){let a={i:n,$:{}};this.keys.forEach((i,l)=>{let r=i.getFn?i.getFn(t):this.getFn(t,i.path);if(F(r)){if(T(r)){let c=[];const d=[{nestedArrIndex:-1,value:r}];for(;d.length;){const{nestedArrIndex:s,value:p}=d.pop();if(F(p))if(R(p)&&!Z(p)){let v={v:p,i:s,n:this.norm.get(p)};c.push(v)}else T(p)&&p.forEach((v,x)=>{d.push({nestedArrIndex:x,value:v})})}a.$[l]=c}else if(R(r)&&!Z(r)){let c={v:r,n:this.norm.get(r)};a.$[l]=c}}}),this.records.push(a)}toJSON(){return{keys:this.keys,records:this.records}}}function Ce(o,t,{getFn:n=h.getFn,fieldNormWeight:a=h.fieldNormWeight}={}){const i=new ae({getFn:n,fieldNormWeight:a});return i.setKeys(o.map(xe)),i.setSources(t),i.create(),i}function Qe(o,{getFn:t=h.getFn,fieldNormWeight:n=h.fieldNormWeight}={}){const{keys:a,records:i}=o,l=new ae({getFn:t,fieldNormWeight:n});return l.setKeys(a),l.setIndexRecords(i),l}function W(o,{errors:t=0,currentLocation:n=0,expectedLocation:a=0,distance:i=h.distance,ignoreLocation:l=h.ignoreLocation}={}){const r=t/o.length;if(l)return r;const c=Math.abs(a-n);return i?r+c/i:c?1:r}function Je(o=[],t=h.minMatchCharLength){let n=[],a=-1,i=-1,l=0;for(let r=o.length;l<r;l+=1){let c=o[l];c&&a===-1?a=l:!c&&a!==-1&&(i=l-1,i-a+1>=t&&n.push([a,i]),a=-1)}return o[l-1]&&l-a>=t&&n.push([a,l-1]),n}const P=32;function Xe(o,t,n,{location:a=h.location,distance:i=h.distance,threshold:l=h.threshold,findAllMatches:r=h.findAllMatches,minMatchCharLength:c=h.minMatchCharLength,includeMatches:d=h.includeMatches,ignoreLocation:s=h.ignoreLocation}={}){if(t.length>P)throw new Error(je(P));const p=t.length,v=o.length,x=Math.max(0,Math.min(a,v));let f=l,u=x;const g=c>1||d,b=g?Array(v):[];let E;for(;(E=o.indexOf(t,u))>-1;){let y=W(t,{currentLocation:E,expectedLocation:x,distance:i,ignoreLocation:s});if(f=Math.min(y,f),u=E+p,g){let A=0;for(;A<p;)b[E+A]=1,A+=1}}u=-1;let w=[],D=1,V=p+v;const S=1<<p-1;for(let y=0;y<p;y+=1){let A=0,k=V;for(;A<k;)W(t,{errors:y,currentLocation:x+k,expectedLocation:x,distance:i,ignoreLocation:s})<=f?A=k:V=k,k=Math.floor((V-A)/2+A);V=k;let N=Math.max(1,x-k+1),B=r?v:Math.min(x+k,v)+p,j=Array(B+2);j[B+1]=(1<<y)-1;for(let C=B;C>=N;C-=1){let m=C-1,_=n[o.charAt(m)];if(g&&(b[m]=+!!_),j[C]=(j[C+1]<<1|1)&_,y&&(j[C]|=(w[C+1]|w[C])<<1|1|w[C+1]),j[C]&S&&(D=W(t,{errors:y,currentLocation:m,expectedLocation:x,distance:i,ignoreLocation:s}),D<=f)){if(f=D,u=m,u<=x)break;N=Math.max(1,2*x-u)}}if(W(t,{errors:y+1,currentLocation:x,expectedLocation:x,distance:i,ignoreLocation:s})>f)break;w=j}const $={isMatch:u>=0,score:Math.max(.001,D)};if(g){const y=Je(b,c);y.length?d&&($.indices=y):$.isMatch=!1}return $}function Ze(o){let t={};for(let n=0,a=o.length;n<a;n+=1){const i=o.charAt(n);t[i]=(t[i]||0)|1<<a-n-1}return t}const K=String.prototype.normalize?(o=>o.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(o=>o);class Ne{constructor(t,{location:n=h.location,threshold:a=h.threshold,distance:i=h.distance,includeMatches:l=h.includeMatches,findAllMatches:r=h.findAllMatches,minMatchCharLength:c=h.minMatchCharLength,isCaseSensitive:d=h.isCaseSensitive,ignoreDiacritics:s=h.ignoreDiacritics,ignoreLocation:p=h.ignoreLocation}={}){if(this.options={location:n,threshold:a,distance:i,includeMatches:l,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:d,ignoreDiacritics:s,ignoreLocation:p},t=d?t:t.toLowerCase(),t=s?K(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const v=(f,u)=>{this.chunks.push({pattern:f,alphabet:Ze(f),startIndex:u})},x=this.pattern.length;if(x>P){let f=0;const u=x%P,g=x-u;for(;f<g;)v(this.pattern.substr(f,P),f),f+=P;if(u){const b=x-P;v(this.pattern.substr(b),b)}}else v(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:a,includeMatches:i}=this.options;if(t=n?t:t.toLowerCase(),t=a?K(t):t,this.pattern===t){let g={isMatch:!0,score:0};return i&&(g.indices=[[0,t.length-1]]),g}const{location:l,distance:r,threshold:c,findAllMatches:d,minMatchCharLength:s,ignoreLocation:p}=this.options;let v=[],x=0,f=!1;this.chunks.forEach(({pattern:g,alphabet:b,startIndex:E})=>{const{isMatch:w,score:D,indices:V}=Xe(t,g,b,{location:l+E,distance:r,threshold:c,findAllMatches:d,minMatchCharLength:s,includeMatches:i,ignoreLocation:p});w&&(f=!0),x+=D,w&&V&&(v=[...v,...V])});let u={isMatch:f,score:f?x/this.chunks.length:1};return f&&i&&(u.indices=v),u}}class O{constructor(t){this.pattern=t}static isMultiMatch(t){return de(t,this.multiRegex)}static isSingleMatch(t){return de(t,this.singleRegex)}search(){}}function de(o,t){const n=o.match(t);return n?n[1]:null}class qe extends O{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class et extends O{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const a=t.indexOf(this.pattern)===-1;return{isMatch:a,score:a?0:1,indices:[0,t.length-1]}}}class tt extends O{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class ot extends O{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class nt extends O{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class st extends O{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class De extends O{constructor(t,{location:n=h.location,threshold:a=h.threshold,distance:i=h.distance,includeMatches:l=h.includeMatches,findAllMatches:r=h.findAllMatches,minMatchCharLength:c=h.minMatchCharLength,isCaseSensitive:d=h.isCaseSensitive,ignoreDiacritics:s=h.ignoreDiacritics,ignoreLocation:p=h.ignoreLocation}={}){super(t),this._bitapSearch=new Ne(t,{location:n,threshold:a,distance:i,includeMatches:l,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:d,ignoreDiacritics:s,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ye extends O{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,a;const i=[],l=this.pattern.length;for(;(a=t.indexOf(this.pattern,n))>-1;)n=a+l,i.push([a,n-1]);const r=!!i.length;return{isMatch:r,score:r?0:1,indices:i}}}const ee=[qe,ye,tt,ot,st,nt,et,De],pe=ee.length,at=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,rt="|";function it(o,t={}){return o.split(rt).map(n=>{let a=n.trim().split(at).filter(l=>l&&!!l.trim()),i=[];for(let l=0,r=a.length;l<r;l+=1){const c=a[l];let d=!1,s=-1;for(;!d&&++s<pe;){const p=ee[s];let v=p.isMultiMatch(c);v&&(i.push(new p(v,t)),d=!0)}if(!d)for(s=-1;++s<pe;){const p=ee[s];let v=p.isSingleMatch(c);if(v){i.push(new p(v,t));break}}}return i})}const lt=new Set([De.type,ye.type]);class ct{constructor(t,{isCaseSensitive:n=h.isCaseSensitive,ignoreDiacritics:a=h.ignoreDiacritics,includeMatches:i=h.includeMatches,minMatchCharLength:l=h.minMatchCharLength,ignoreLocation:r=h.ignoreLocation,findAllMatches:c=h.findAllMatches,location:d=h.location,threshold:s=h.threshold,distance:p=h.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:a,includeMatches:i,minMatchCharLength:l,findAllMatches:c,ignoreLocation:r,location:d,threshold:s,distance:p},t=n?t:t.toLowerCase(),t=a?K(t):t,this.pattern=t,this.query=it(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:a,isCaseSensitive:i,ignoreDiacritics:l}=this.options;t=i?t:t.toLowerCase(),t=l?K(t):t;let r=0,c=[],d=0;for(let s=0,p=n.length;s<p;s+=1){const v=n[s];c.length=0,r=0;for(let x=0,f=v.length;x<f;x+=1){const u=v[x],{isMatch:g,indices:b,score:E}=u.search(t);if(g){if(r+=1,d+=E,a){const w=u.constructor.type;lt.has(w)?c=[...c,...b]:c.push(b)}}else{d=0,r=0,c.length=0;break}}if(r){let x={isMatch:!0,score:d/r};return a&&(x.indices=c),x}}return{isMatch:!1,score:1}}}const te=[];function ut(...o){te.push(...o)}function oe(o,t){for(let n=0,a=te.length;n<a;n+=1){let i=te[n];if(i.condition(o,t))return new i(o,t)}return new Ne(o,t)}const G={AND:"$and",OR:"$or"},ne={PATH:"$path",PATTERN:"$val"},se=o=>!!(o[G.AND]||o[G.OR]),dt=o=>!!o[ne.PATH],pt=o=>!T(o)&&ge(o)&&!se(o),me=o=>({[G.AND]:Object.keys(o).map(t=>({[t]:o[t]}))});function _e(o,t,{auto:n=!0}={}){const a=i=>{let l=Object.keys(i);const r=dt(i);if(!r&&l.length>1&&!se(i))return a(me(i));if(pt(i)){const d=r?i[ne.PATH]:l[0],s=r?i[ne.PATTERN]:i[d];if(!R(s))throw new Error(Te(d));const p={keyId:q(d),pattern:s};return n&&(p.searcher=oe(s,t)),p}let c={children:[],operator:l[0]};return l.forEach(d=>{const s=i[d];T(s)&&s.forEach(p=>{c.children.push(a(p))})}),c};return se(o)||(o=me(o)),a(o)}function mt(o,{ignoreFieldNorm:t=h.ignoreFieldNorm}){o.forEach(n=>{let a=1;n.matches.forEach(({key:i,norm:l,score:r})=>{const c=i?i.weight:null;a*=Math.pow(r===0&&c?Number.EPSILON:r,(c||1)*(t?1:l))}),n.score=a})}function ft(o,t){const n=o.matches;t.matches=[],F(n)&&n.forEach(a=>{if(!F(a.indices)||!a.indices.length)return;const{indices:i,value:l}=a;let r={indices:i,value:l};a.key&&(r.key=a.key.src),a.idx>-1&&(r.refIndex=a.idx),t.matches.push(r)})}function vt(o,t){t.score=o.score}function gt(o,t,{includeMatches:n=h.includeMatches,includeScore:a=h.includeScore}={}){const i=[];return n&&i.push(ft),a&&i.push(vt),o.map(l=>{const{idx:r}=l,c={item:t[r],refIndex:r};return i.length&&i.forEach(d=>{d(l,c)}),c})}class U{constructor(t,n={},a){this.options={...h,...n},this.options.useExtendedSearch,this._keyStore=new Pe(this.options.keys),this.setCollection(t,a)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof ae))throw new Error(Ie);this._myIndex=n||Ce(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){F(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let a=0,i=this._docs.length;a<i;a+=1){const l=this._docs[a];t(l,a)&&(this.removeAt(a),a-=1,i-=1,n.push(l))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:a,includeScore:i,shouldSort:l,sortFn:r,ignoreFieldNorm:c}=this.options;let d=R(t)?R(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return mt(d,{ignoreFieldNorm:c}),l&&d.sort(r),ve(n)&&n>-1&&(d=d.slice(0,n)),gt(d,this._docs,{includeMatches:a,includeScore:i})}_searchStringList(t){const n=oe(t,this.options),{records:a}=this._myIndex,i=[];return a.forEach(({v:l,i:r,n:c})=>{if(!F(l))return;const{isMatch:d,score:s,indices:p}=n.searchIn(l);d&&i.push({item:l,idx:r,matches:[{score:s,value:l,norm:c,indices:p}]})}),i}_searchLogical(t){const n=_e(t,this.options),a=(c,d,s)=>{if(!c.children){const{keyId:v,searcher:x}=c,f=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(d,v),searcher:x});return f&&f.length?[{idx:s,item:d,matches:f}]:[]}const p=[];for(let v=0,x=c.children.length;v<x;v+=1){const f=c.children[v],u=a(f,d,s);if(u.length)p.push(...u);else if(c.operator===G.AND)return[]}return p},i=this._myIndex.records,l={},r=[];return i.forEach(({$:c,i:d})=>{if(F(c)){let s=a(n,c,d);s.length&&(l[d]||(l[d]={idx:d,item:c,matches:[]},r.push(l[d])),s.forEach(({matches:p})=>{l[d].matches.push(...p)}))}}),r}_searchObjectList(t){const n=oe(t,this.options),{keys:a,records:i}=this._myIndex,l=[];return i.forEach(({$:r,i:c})=>{if(!F(r))return;let d=[];a.forEach((s,p)=>{d.push(...this._findMatches({key:s,value:r[p],searcher:n}))}),d.length&&l.push({idx:c,item:r,matches:d})}),l}_findMatches({key:t,value:n,searcher:a}){if(!F(n))return[];let i=[];if(T(n))n.forEach(({v:l,i:r,n:c})=>{if(!F(l))return;const{isMatch:d,score:s,indices:p}=a.searchIn(l);d&&i.push({score:s,key:t,value:l,idx:r,norm:c,indices:p})});else{const{v:l,n:r}=n,{isMatch:c,score:d,indices:s}=a.searchIn(l);c&&i.push({score:d,key:t,value:l,norm:r,indices:s})}return i}}U.version="7.1.0";U.createIndex=Ce;U.parseIndex=Qe;U.config=h;U.parseQuery=_e;ut(ct);const L=o=>o==null?"—":`€${o.toFixed(2)}`,ht=o=>{if(!o)return"—";if(o<60)return`${o} min`;const t=Math.floor(o/60),n=o%60;return n>0?`${t}h ${n}min`:`${t}h`},xt=o=>{switch(o){case"confirmed":return"Confirmed";case"completed":return"Completed";case"pending":return"Pending";case"cancelled":return"Cancelled";default:return o||"Unknown"}},fe=o=>{switch(o){case"confirmed":case"completed":return"#16a34a";case"pending":return"#ca8a04";case"cancelled":return"#dc2626";default:return"#6b7280"}},Ct=(o,t={})=>{const n=`${o.customerInfo?.firstName||""} ${o.customerInfo?.lastName||""}`.trim()||"Unknown Customer",a=o.id?.slice(0,8)||"—",i=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),l=`
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Reservation ${a}</title>
8
+ <style>
9
+ * {
10
+ margin: 0;
11
+ padding: 0;
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ body {
16
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
17
+ line-height: 1.6;
18
+ color: #1f2937;
19
+ background: #fff;
20
+ padding: 40px;
21
+ max-width: 800px;
22
+ margin: 0 auto;
23
+ }
24
+
25
+ .header {
26
+ display: flex;
27
+ justify-content: space-between;
28
+ align-items: flex-start;
29
+ margin-bottom: 40px;
30
+ padding-bottom: 20px;
31
+ border-bottom: 2px solid #e5e7eb;
32
+ }
33
+
34
+ .company-info {
35
+ display: flex;
36
+ align-items: center;
37
+ gap: 16px;
38
+ }
39
+
40
+ .company-logo {
41
+ max-height: 50px;
42
+ max-width: 150px;
43
+ object-fit: contain;
44
+ }
45
+
46
+ .company-name {
47
+ font-size: 24px;
48
+ font-weight: 700;
49
+ color: #111827;
50
+ }
51
+
52
+ .document-info {
53
+ text-align: right;
54
+ }
55
+
56
+ .document-title {
57
+ font-size: 28px;
58
+ font-weight: 700;
59
+ color: #111827;
60
+ margin-bottom: 8px;
61
+ }
62
+
63
+ .booking-id {
64
+ font-size: 14px;
65
+ color: #6b7280;
66
+ }
67
+
68
+ .status-badge {
69
+ display: inline-block;
70
+ padding: 4px 12px;
71
+ border-radius: 9999px;
72
+ font-size: 12px;
73
+ font-weight: 600;
74
+ text-transform: uppercase;
75
+ margin-top: 8px;
76
+ }
77
+
78
+ .section {
79
+ margin-bottom: 32px;
80
+ }
81
+
82
+ .section-title {
83
+ font-size: 12px;
84
+ font-weight: 600;
85
+ text-transform: uppercase;
86
+ letter-spacing: 0.05em;
87
+ color: #6b7280;
88
+ margin-bottom: 12px;
89
+ }
90
+
91
+ .section-content {
92
+ background: #f9fafb;
93
+ border-radius: 8px;
94
+ padding: 20px;
95
+ }
96
+
97
+ .customer-name {
98
+ font-size: 18px;
99
+ font-weight: 600;
100
+ margin-bottom: 8px;
101
+ }
102
+
103
+ .contact-info {
104
+ font-size: 14px;
105
+ color: #4b5563;
106
+ }
107
+
108
+ .contact-info a {
109
+ color: #4b5563;
110
+ text-decoration: none;
111
+ }
112
+
113
+ .grid {
114
+ display: grid;
115
+ grid-template-columns: 1fr 1fr;
116
+ gap: 16px;
117
+ }
118
+
119
+ .info-card {
120
+ background: #f9fafb;
121
+ border-radius: 8px;
122
+ padding: 16px;
123
+ }
124
+
125
+ .info-label {
126
+ font-size: 12px;
127
+ color: #6b7280;
128
+ margin-bottom: 4px;
129
+ }
130
+
131
+ .info-value {
132
+ font-size: 16px;
133
+ font-weight: 600;
134
+ }
135
+
136
+ .package-row {
137
+ display: flex;
138
+ justify-content: space-between;
139
+ align-items: flex-start;
140
+ }
141
+
142
+ .package-name {
143
+ font-size: 16px;
144
+ font-weight: 600;
145
+ }
146
+
147
+ .package-duration {
148
+ font-size: 14px;
149
+ color: #6b7280;
150
+ }
151
+
152
+ .package-price {
153
+ font-size: 16px;
154
+ font-weight: 600;
155
+ }
156
+
157
+ .payment-row {
158
+ display: flex;
159
+ justify-content: space-between;
160
+ padding: 8px 0;
161
+ font-size: 14px;
162
+ }
163
+
164
+ .payment-label {
165
+ color: #6b7280;
166
+ }
167
+
168
+ .payment-value {
169
+ font-weight: 500;
170
+ }
171
+
172
+ .payment-value.green {
173
+ color: #16a34a;
174
+ }
175
+
176
+ .payment-value.orange {
177
+ color: #ea580c;
178
+ }
179
+
180
+ .payment-divider {
181
+ border-top: 1px solid #e5e7eb;
182
+ margin: 12px 0;
183
+ }
184
+
185
+ .payment-total {
186
+ font-size: 16px;
187
+ font-weight: 600;
188
+ }
189
+
190
+ .footer {
191
+ margin-top: 60px;
192
+ padding-top: 20px;
193
+ border-top: 1px solid #e5e7eb;
194
+ text-align: center;
195
+ font-size: 12px;
196
+ color: #9ca3af;
197
+ }
198
+
199
+ @media print {
200
+ body {
201
+ padding: 20px;
202
+ }
203
+
204
+ .no-print {
205
+ display: none;
206
+ }
207
+ }
208
+ </style>
209
+ </head>
210
+ <body>
211
+ <div class="header">
212
+ <div class="company-info">
213
+ ${t.companyLogo?`<img src="${t.companyLogo}" alt="Logo" class="company-logo" />`:""}
214
+ ${t.companyName?`<span class="company-name">${t.companyName}</span>`:""}
215
+ </div>
216
+ <div class="document-info">
217
+ <div class="document-title">Reservation</div>
218
+ <div class="booking-id">Booking #${a}</div>
219
+ <div
220
+ class="status-badge"
221
+ style="background-color: ${fe(o.status)}20; color: ${fe(o.status)};"
222
+ >
223
+ ${xt(o.status)}
224
+ </div>
225
+ </div>
226
+ </div>
227
+
228
+ <div class="section">
229
+ <div class="section-title">Customer</div>
230
+ <div class="section-content">
231
+ <div class="customer-name">${n}</div>
232
+ <div class="contact-info">
233
+ ${o.customerInfo?.email?`<div>Email: <a href="mailto:${o.customerInfo.email}">${o.customerInfo.email}</a></div>`:""}
234
+ ${o.customerInfo?.phone?`<div>Phone: <a href="tel:${o.customerInfo.phone}">${o.customerInfo.phone}</a></div>`:""}
235
+ </div>
236
+ </div>
237
+ </div>
238
+
239
+ <div class="section">
240
+ <div class="section-title">Reservation Details</div>
241
+ <div class="grid">
242
+ <div class="info-card">
243
+ <div class="info-label">Date</div>
244
+ <div class="info-value">${t.date||"—"}</div>
245
+ </div>
246
+ <div class="info-card">
247
+ <div class="info-label">Time</div>
248
+ <div class="info-value">${o.startTime} - ${o.endTime}</div>
249
+ </div>
250
+ <div class="info-card">
251
+ <div class="info-label">Spots</div>
252
+ <div class="info-value">${o.spots||1} ${(o.spots||1)===1?"person":"people"}</div>
253
+ </div>
254
+ ${t.resourceName?`
255
+ <div class="info-card">
256
+ <div class="info-label">Resource</div>
257
+ <div class="info-value">${t.resourceName}</div>
258
+ </div>
259
+ `:""}
260
+ ${t.agendaName?`
261
+ <div class="info-card">
262
+ <div class="info-label">Service</div>
263
+ <div class="info-value">${t.agendaName}</div>
264
+ </div>
265
+ `:""}
266
+ </div>
267
+ </div>
268
+
269
+ ${o.pricingOption?`
270
+ <div class="section">
271
+ <div class="section-title">Package</div>
272
+ <div class="section-content">
273
+ <div class="package-row">
274
+ <div>
275
+ <div class="package-name">${o.pricingOption.name}</div>
276
+ <div class="package-duration">${ht(o.pricingOption.duration)}</div>
277
+ </div>
278
+ <div class="package-price">${L(o.pricingOption.price)}</div>
279
+ </div>
280
+ </div>
281
+ </div>
282
+ `:""}
283
+
284
+ <div class="section">
285
+ <div class="section-title">Payment Summary</div>
286
+ <div class="section-content">
287
+ <div class="payment-row">
288
+ <span class="payment-label">Base price</span>
289
+ <span class="payment-value">${L(o.reservationBasePrice)}</span>
290
+ </div>
291
+ ${o.reservationAddOnsPrice?`
292
+ <div class="payment-row">
293
+ <span class="payment-label">Add-ons</span>
294
+ <span class="payment-value">${L(o.reservationAddOnsPrice)}</span>
295
+ </div>
296
+ `:""}
297
+ ${o.discount?`
298
+ <div class="payment-row">
299
+ <span class="payment-label">Discount</span>
300
+ <span class="payment-value green">-${L(o.discount)}</span>
301
+ </div>
302
+ `:""}
303
+
304
+ <div class="payment-divider"></div>
305
+
306
+ <div class="payment-row payment-total">
307
+ <span>Reservation Total</span>
308
+ <span>${L(o.reservationPrice)}</span>
309
+ </div>
310
+
311
+ ${o.amountPaid!==void 0||o.amountDue!==void 0?`
312
+ <div class="payment-divider"></div>
313
+
314
+ ${o.amountPaid!==void 0?`
315
+ <div class="payment-row">
316
+ <span class="payment-label">Amount paid</span>
317
+ <span class="payment-value green">${L(o.amountPaid)}</span>
318
+ </div>
319
+ `:""}
320
+
321
+ ${o.amountDue!==void 0&&o.amountDue>0?`
322
+ <div class="payment-row">
323
+ <span class="payment-label">Amount due</span>
324
+ <span class="payment-value orange">${L(o.amountDue)}</span>
325
+ </div>
326
+ `:""}
327
+ `:""}
328
+ </div>
329
+ </div>
330
+
331
+ <div class="footer">
332
+ <p>Generated on ${i}</p>
333
+ ${t.companyName?`<p>${t.companyName}</p>`:""}
334
+ </div>
335
+ </body>
336
+ </html>
337
+ `,r=window.open("","_blank");r&&(r.document.write(l),r.document.close(),r.onload=()=>{r.print()})},Nt={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},Dt={class:"grid gap-2"},yt={class:"grid gap-2"},_t={class:"grid gap-2"},Vt=e.defineComponent({__name:"CancelReservationDialog",emits:["confirm"],setup(o,{expose:t,emit:n}){const{config:a}=I.useModule(),{sendMail:i}=I.useMailer(a.mailAccount),l=n,r=e.ref(!1),c=e.ref(!1),d=e.ref(""),s=e.ref(""),p=e.ref(""),v=f=>{c.value=!a.mailAccount,r.value=!0,f&&(d.value=f.customerInfo?.email,s.value="Cancellation of your reservation - "+new Date(f.date)?.toDateString(),p.value=`Dear ${f.customerInfo?.firstName??""} ${f.customerInfo?.lastName??""},
338
+
339
+ We are writing to inform you that your reservation scheduled for ${new Date(f.date)?.toDateString()} at ${f.startTime} has been cancelled.
340
+
341
+ Please accept our sincere apologies for any inconvenience this may cause. We would be happy to help you find an alternative time that works for you.`)},x=()=>{if(!c.value){if(!d.value||!s.value||!p.value)return alert("Please fill in all the fields.");i({to:d.value,subject:s.value,body:p.value})}r.value=!1;const{$confetti:f}=useNuxtApp();f(),l("confirm")};return t({openDialog:v}),(f,u)=>{const g=e.resolveComponent("DialogTitle"),b=e.resolveComponent("DialogDescription"),E=e.resolveComponent("DialogHeader"),w=e.resolveComponent("Checkbox"),D=e.resolveComponent("Label"),V=e.resolveComponent("Input"),S=e.resolveComponent("Textarea"),$=e.resolveComponent("Button"),y=e.resolveComponent("DialogFooter"),A=e.resolveComponent("DialogScrollContent"),k=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(k,{open:r.value,"onUpdate:open":u[5]||(u[5]=N=>r.value=N)},{default:e.withCtx(()=>[e.createVNode(A,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[...u[6]||(u[6]=[e.createTextVNode(" Cancel Reservation ",-1)])]),_:1}),e.createVNode(b)]),_:1}),e.createElementVNode("div",Nt,[e.createVNode(w,{modelValue:c.value,"onUpdate:modelValue":u[0]||(u[0]=N=>c.value=N),id:"cancel-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(a).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(D,{for:"cancel-dialog-skip-mail",class:"py-4 pl-2 pr-4"},{default:e.withCtx(()=>[...u[7]||(u[7]=[e.createTextVNode("Do not send email to customer",-1)])]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["grid gap-4 py-4",{"opacity-50":c.value}])},[e.createElementVNode("div",Dt,[e.createVNode(D,{for:"cancel-dialog-email"},{default:e.withCtx(()=>[...u[8]||(u[8]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(V,{modelValue:d.value,"onUpdate:modelValue":u[1]||(u[1]=N=>d.value=N),disabled:c.value,id:"cancel-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",yt,[e.createVNode(D,{for:"cancel-dialog-subject"},{default:e.withCtx(()=>[...u[9]||(u[9]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(V,{modelValue:s.value,"onUpdate:modelValue":u[2]||(u[2]=N=>s.value=N),disabled:c.value,id:"cancel-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",_t,[e.createVNode(D,{for:"cancel-dialog-body"},{default:e.withCtx(()=>[...u[10]||(u[10]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode(S,{modelValue:p.value,"onUpdate:modelValue":u[3]||(u[3]=N=>p.value=N),disabled:c.value,id:"cancel-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode($,{variant:"outline",onClick:u[4]||(u[4]=N=>r.value=!1)},{default:e.withCtx(()=>[...u[11]||(u[11]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode($,{variant:"destructive",onClick:x},{default:e.withCtx(()=>[...u[12]||(u[12]=[e.createTextVNode("Cancel reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),bt=e.defineComponent({__name:"TransferReservationDialog",setup(o,{expose:t}){const{config:n}=I.useModule(),a=e.ref(!1);return t({openDialog:()=>{a.value=!0}}),(l,r)=>{const c=e.resolveComponent("DialogTitle"),d=e.resolveComponent("DialogDescription"),s=e.resolveComponent("DialogHeader"),p=e.resolveComponent("Button"),v=e.resolveComponent("DialogFooter"),x=e.resolveComponent("DialogScrollContent"),f=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(f,{open:a.value,"onUpdate:open":r[2]||(r[2]=u=>a.value=u)},{default:e.withCtx(()=>[e.createVNode(x,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[...r[3]||(r[3]=[e.createTextVNode(" Transfer Reservation ",-1)])]),_:1}),e.createVNode(d)]),_:1}),r[6]||(r[6]=e.createElementVNode("div",{class:"py-4"},null,-1)),e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(p,{variant:"outline",onClick:r[0]||(r[0]=u=>a.value=!1)},{default:e.withCtx(()=>[...r[4]||(r[4]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(p,{onClick:r[1]||(r[1]=u=>a.value=!1)},{default:e.withCtx(()=>[...r[5]||(r[5]=[e.createTextVNode("Transfer reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),wt={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},Et={class:"grid gap-2"},At={class:"grid gap-2"},kt={class:"grid gap-2"},Bt=e.defineComponent({__name:"ApproveReservationDialog",emits:["confirm"],setup(o,{expose:t,emit:n}){const{config:a}=I.useModule(),{sendMail:i}=I.useMailer(a.mailAccount),l=n,r=e.ref(!1),c=e.ref("approve"),d=e.ref(!1),s=e.ref(""),p=e.ref(""),v=e.ref(""),x=(u,g)=>{d.value=!a.mailAccount,r.value=!0,u&&(g||(g="approve"),c.value=g,s.value=u.customerInfo?.email,p.value="Confirmation: Your reservation for "+new Date(u.date)?.toDateString(),v.value=`Dear ${u.customerInfo?.firstName??""} ${u.customerInfo?.lastName??""},
342
+
343
+ This email confirms your reservation for ${new Date(u.date)?.toDateString()} at ${u.startTime}.
344
+
345
+ We've got everything ready for you and look forward to your visit! If you need to make any changes or have special requests, please let us know.`)},f=()=>{if(!d.value){if(!s.value||!p.value||!v.value)return alert("Please fill in all the fields.");i({to:s.value,subject:p.value,body:v.value})}r.value=!1;const{$confetti:u}=useNuxtApp();u(),l("confirm")};return t({openDialog:x}),(u,g)=>{const b=e.resolveComponent("DialogTitle"),E=e.resolveComponent("DialogDescription"),w=e.resolveComponent("DialogHeader"),D=e.resolveComponent("Checkbox"),V=e.resolveComponent("Label"),S=e.resolveComponent("Input"),$=e.resolveComponent("Textarea"),y=e.resolveComponent("Button"),A=e.resolveComponent("DialogFooter"),k=e.resolveComponent("DialogScrollContent"),N=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(N,{open:r.value,"onUpdate:open":g[5]||(g[5]=B=>r.value=B)},{default:e.withCtx(()=>[e.createVNode(k,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value==="approve"?"Approve Reservation":"Resend Confirmation Email"),1)]),_:1}),e.createVNode(E)]),_:1}),e.createElementVNode("div",wt,[e.createVNode(D,{modelValue:d.value,"onUpdate:modelValue":g[0]||(g[0]=B=>d.value=B),id:"reject-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(a).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(V,{for:"reject-dialog-skip-mail",class:"py-4 pl-2 pr-4"},{default:e.withCtx(()=>[...g[6]||(g[6]=[e.createTextVNode("Do not send email to customer",-1)])]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["grid gap-4 py-4",{"opacity-50":d.value}])},[e.createElementVNode("div",Et,[e.createVNode(V,{for:"approve-dialog-email"},{default:e.withCtx(()=>[...g[7]||(g[7]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(S,{modelValue:s.value,"onUpdate:modelValue":g[1]||(g[1]=B=>s.value=B),disabled:d.value,id:"approve-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",At,[e.createVNode(V,{for:"approve-dialog-subject"},{default:e.withCtx(()=>[...g[8]||(g[8]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(S,{modelValue:p.value,"onUpdate:modelValue":g[2]||(g[2]=B=>p.value=B),disabled:d.value,id:"approve-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",kt,[e.createVNode(V,{for:"approve-dialog-body"},{default:e.withCtx(()=>[...g[9]||(g[9]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode($,{modelValue:v.value,"onUpdate:modelValue":g[3]||(g[3]=B=>v.value=B),disabled:d.value,id:"approve-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode(A,null,{default:e.withCtx(()=>[e.createVNode(y,{variant:"outline",onClick:g[4]||(g[4]=B=>r.value=!1)},{default:e.withCtx(()=>[...g[10]||(g[10]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(y,{onClick:f},{default:e.withCtx(()=>[...g[11]||(g[11]=[e.createTextVNode("Approve reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),Mt={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},$t={class:"grid gap-2"},Ft={class:"grid gap-2"},St={class:"grid gap-2"},Rt=e.defineComponent({__name:"RejectReservationDialog",emits:["confirm"],setup(o,{expose:t,emit:n}){const{config:a}=I.useModule(),{sendMail:i}=I.useMailer(a.mailAccount),l=n,r=e.ref(!1),c=e.ref(!1),d=e.ref(""),s=e.ref(""),p=e.ref(""),v=f=>{c.value=!a.mailAccount,r.value=!0,f&&(d.value=f.customerInfo?.email,s.value="Regarding your reservation request for "+new Date(f.date)?.toDateString(),p.value=`Dear ${f.customerInfo?.firstName??""} ${f.customerInfo?.lastName??""},
346
+
347
+ Thank you for your interest in booking with us. Unfortunately, we are unable to confirm your request for ${new Date(f.date)?.toDateString()} at ${f.startTime}.
348
+
349
+ We would love to see you another time!`)},x=()=>{if(!c.value){if(!d.value||!s.value||!p.value)return alert("Please fill in all the fields.");i({to:d.value,subject:s.value,body:p.value})}r.value=!1;const{$confetti:f}=useNuxtApp();f(),l("confirm")};return t({openDialog:v}),(f,u)=>{const g=e.resolveComponent("DialogTitle"),b=e.resolveComponent("DialogDescription"),E=e.resolveComponent("DialogHeader"),w=e.resolveComponent("Checkbox"),D=e.resolveComponent("Label"),V=e.resolveComponent("Input"),S=e.resolveComponent("Textarea"),$=e.resolveComponent("Button"),y=e.resolveComponent("DialogFooter"),A=e.resolveComponent("DialogScrollContent"),k=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(k,{open:r.value,"onUpdate:open":u[5]||(u[5]=N=>r.value=N)},{default:e.withCtx(()=>[e.createVNode(A,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[...u[6]||(u[6]=[e.createTextVNode(" Reject Reservation Request ",-1)])]),_:1}),e.createVNode(b)]),_:1}),e.createElementVNode("div",Mt,[e.createVNode(w,{modelValue:c.value,"onUpdate:modelValue":u[0]||(u[0]=N=>c.value=N),id:"reject-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(a).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(D,{for:"reject-dialog-skip-mail",class:"py-4 pl-2 pr-4"},{default:e.withCtx(()=>[...u[7]||(u[7]=[e.createTextVNode("Do not send email to customer",-1)])]),_:1})]),e.createElementVNode("div",{class:e.normalizeClass(["grid gap-4 py-4",{"opacity-50":c.value}])},[e.createElementVNode("div",$t,[e.createVNode(D,{for:"reject-dialog-email"},{default:e.withCtx(()=>[...u[8]||(u[8]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(V,{modelValue:d.value,"onUpdate:modelValue":u[1]||(u[1]=N=>d.value=N),disabled:c.value,id:"reject-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Ft,[e.createVNode(D,{for:"reject-dialog-subject"},{default:e.withCtx(()=>[...u[9]||(u[9]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(V,{modelValue:s.value,"onUpdate:modelValue":u[2]||(u[2]=N=>s.value=N),disabled:c.value,id:"reject-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",St,[e.createVNode(D,{for:"reject-dialog-body"},{default:e.withCtx(()=>[...u[10]||(u[10]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode(S,{modelValue:p.value,"onUpdate:modelValue":u[3]||(u[3]=N=>p.value=N),disabled:c.value,id:"reject-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode($,{variant:"outline",onClick:u[4]||(u[4]=N=>r.value=!1)},{default:e.withCtx(()=>[...u[11]||(u[11]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode($,{variant:"destructive",onClick:x},{default:e.withCtx(()=>[...u[12]||(u[12]=[e.createTextVNode("Reject reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),It={key:0,class:"space-y-6 py-4"},Tt={class:"space-y-3"},jt={class:"bg-muted/30 rounded-lg p-4 space-y-3"},Ot={class:"flex items-center gap-3"},Lt={class:"h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center"},Pt={class:"font-medium"},zt={class:"grid gap-2 text-sm"},Ut={key:0,class:"flex items-center gap-2 text-muted-foreground"},Ht=["href"],Wt={key:1,class:"flex items-center gap-2 text-muted-foreground"},Kt=["href"],Gt={class:"space-y-3"},Yt={class:"grid grid-cols-2 gap-3"},Qt={class:"bg-muted/30 rounded-lg p-3"},Jt={class:"flex items-center gap-2 text-muted-foreground mb-1"},Xt={class:"font-medium"},Zt={class:"bg-muted/30 rounded-lg p-3"},qt={class:"flex items-center gap-2 text-muted-foreground mb-1"},eo={class:"font-medium"},to={key:0,class:"space-y-3"},oo={class:"bg-muted/30 rounded-lg p-4"},no={class:"flex items-start justify-between"},so={class:"flex items-start gap-3"},ao={class:"h-9 w-9 rounded-lg bg-primary/10 flex items-center justify-center mt-0.5"},ro={class:"font-medium"},io={class:"text-sm text-muted-foreground"},lo={class:"font-semibold"},co={class:"space-y-3"},uo={class:"bg-muted/30 rounded-lg p-4 space-y-3"},po={class:"space-y-2 text-sm"},mo={class:"flex justify-between"},fo={key:0,class:"flex justify-between"},vo={key:1,class:"flex justify-between text-green-600 dark:text-green-400"},go={class:"flex justify-between font-semibold"},ho={key:1,class:"space-y-2 text-sm"},xo={key:0,class:"flex justify-between"},Co={class:"text-muted-foreground flex items-center gap-1.5"},No={class:"text-green-600 dark:text-green-400"},Do={key:1,class:"flex justify-between"},yo={class:"text-muted-foreground flex items-center gap-1.5"},_o={class:"text-orange-600 dark:text-orange-400 font-medium"},Vo=e.defineComponent({__name:"ReservationDetailDialog",emits:["cancelled","confirmed","rejected"],setup(o,{expose:t,emit:n}){const{hasPermission:a}=I.useModulePermissions(),{config:i}=I.useModule(),l=I.useFirebaseIntegration(i.project),r=e.inject("event",e.ref(null)),c=n,d=e.ref(!1),s=e.ref(null),p=e.ref(!1),v=e.useTemplateRef("cancelReservationDialog"),x=e.useTemplateRef("approveReservationDialog"),f=e.useTemplateRef("rejectReservationDialog"),u=e.useTemplateRef("transferReservationDialog"),g=C=>{s.value=C,d.value=!0},b=e.computed(()=>s.value?.customerInfo&&`${s.value.customerInfo.firstName} ${s.value.customerInfo.lastName}`.trim()||"Unknown Customer"),E=e.computed(()=>{let C=s.value?.status;const m=s.value?.reservationStatus;switch(["needs_approval","rejected","approved","cancelled"].includes(m)&&(C=m),C){case"needs_approval":return{label:"Needs Approval",class:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"};case"rejected":return{label:"Rejected",class:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"};case"approved":return{label:"Approved",class:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"};case"pending":return{label:"Pending",class:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"};case"cancelled":return{label:"Cancelled",class:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"};default:return{label:C||"Unknown",class:"bg-muted text-muted-foreground"}}}),w=e.computed(()=>s.value?.status==="cancelled"),D=C=>C==null||typeof C!="number"?"—":`€${C?.toFixed(2)}`,V=C=>{if(!C)return"—";if(C<60)return`${C} min`;const m=Math.floor(C/60),_=C%60;return _>0?`${m}h ${_}min`:`${m}h`},S=()=>{if(!s.value)return;let C="";const m=r?.value?.date;if(m)try{C=new Date(m).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}catch{C=m}const _={date:C,resourceName:r?.value?.resource?.name};Ct(s.value,_)},$=()=>{x.value?.openDialog(s.value)},y=()=>{f.value?.openDialog(s.value)},A=()=>{x.value?.openDialog(s.value)},k=()=>{v.value?.openDialog(s.value)},N=async()=>{try{if(p.value||!s.value?.id)throw new Error("Invalid state");p.value=!0;let m=(await l.get(i.reservationsCollection,s.value.id))?.reservations||[];if(!m.find(_=>_.id===s.value.res_id))throw new Error("Reservation not found");m.find(_=>_.id===s.value.res_id).status="cancelled",await l.update(i.reservationsCollection,s.value.id,{reservations:m}),s.value.status="cancelled",z.toast.success("Reservation cancelled successfully"),c("cancelled"),d.value=!1}catch(C){console.error("Error cancelling reservation:",C),z.toast.error("Failed to cancel reservation")}finally{p.value=!1}},B=async()=>{try{if(p.value||!s.value?.id)throw new Error("Invalid state");p.value=!0;let m=(await l.get(i.reservationsCollection,s.value.id))?.reservations||[];if(!m.find(_=>_.id===s.value.res_id))throw new Error("Reservation not found");m.find(_=>_.id===s.value.res_id).status="approved",await l.update(i.reservationsCollection,s.value.id,{reservations:m}),s.value.status="approved",z.toast.success("Reservation approved successfully"),c("confirmed"),d.value=!1}catch(C){console.error("Error approving reservation:",C),z.toast.error("Failed to approve reservation")}finally{p.value=!1}},j=async()=>{try{if(p.value||!s.value?.id)throw new Error("Invalid state");p.value=!0;let m=(await l.get(i.reservationsCollection,s.value.id))?.reservations||[];if(!m.find(_=>_.id===s.value.res_id))throw new Error("Reservation not found");m.find(_=>_.id===s.value.res_id).status="rejected",await l.update(i.reservationsCollection,s.value.id,{reservations:m}),s.value.status="rejected",z.toast.success("Reservation rejected successfully"),c("rejected"),d.value=!1}catch(C){console.error("Error rejecting reservation:",C),z.toast.error("Failed to reject reservation")}finally{p.value=!1}},re=()=>{console.log("Cancel with coupon:",s.value?.id)};return t({openDialog:g}),(C,m)=>{const _=e.resolveComponent("DialogTitle"),Y=e.resolveComponent("DialogDescription"),Ve=e.resolveComponent("DialogHeader"),ie=e.resolveComponent("Separator"),Q=e.resolveComponent("Button"),be=e.resolveComponent("DropdownMenuTrigger"),J=e.resolveComponent("DropdownMenuLabel"),H=e.resolveComponent("DropdownMenuItem"),X=e.resolveComponent("DropdownMenuGroup"),le=e.resolveComponent("DropdownMenuSeparator"),we=e.resolveComponent("DropdownMenuContent"),Ee=e.resolveComponent("DropdownMenu"),Ae=e.resolveComponent("DialogFooter"),ke=e.resolveComponent("DialogScrollContent"),Be=e.resolveComponent("Dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Be,{open:d.value,"onUpdate:open":m[0]||(m[0]=Me=>d.value=Me)},{default:e.withCtx(()=>[e.createVNode(ke,{class:"sm:max-w-xl"},{default:e.withCtx(()=>[e.createVNode(Ve,null,{default:e.withCtx(()=>[e.createVNode(_,{class:"flex items-center gap-3"},{default:e.withCtx(()=>[m[1]||(m[1]=e.createElementVNode("span",null,"Reservation Details",-1)),e.createElementVNode("span",{class:e.normalizeClass(["px-2.5 py-1 text-xs font-medium rounded-full",E.value.class])},e.toDisplayString(E.value.label),3)]),_:1}),e.createVNode(Y,null,{default:e.withCtx(()=>[e.createTextVNode(" Booking #"+e.toDisplayString(s.value?.id?.slice(0,8)||"—"),1)]),_:1})]),_:1}),s.value?(e.openBlock(),e.createElementBlock("div",It,[e.createElementVNode("div",Tt,[m[2]||(m[2]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Customer",-1)),e.createElementVNode("div",jt,[e.createElementVNode("div",Ot,[e.createElementVNode("div",Lt,[e.createVNode(e.unref(M.User),{size:20,class:"text-primary"})]),e.createElementVNode("div",null,[e.createElementVNode("p",Pt,e.toDisplayString(b.value),1)])]),e.createElementVNode("div",zt,[s.value.customerInfo?.email?(e.openBlock(),e.createElementBlock("div",Ut,[e.createVNode(e.unref(M.Mail),{size:14}),e.createElementVNode("a",{href:`mailto:${s.value.customerInfo.email}`,class:"hover:text-foreground transition-colors"},e.toDisplayString(s.value.customerInfo.email),9,Ht)])):e.createCommentVNode("",!0),s.value.customerInfo?.phone?(e.openBlock(),e.createElementBlock("div",Wt,[e.createVNode(e.unref(M.Phone),{size:14}),e.createElementVNode("a",{href:`tel:${s.value.customerInfo.phone}`,class:"hover:text-foreground transition-colors"},e.toDisplayString(s.value.customerInfo.phone),9,Kt)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Gt,[m[5]||(m[5]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Reservation",-1)),e.createElementVNode("div",Yt,[e.createElementVNode("div",Qt,[e.createElementVNode("div",Jt,[e.createVNode(e.unref(M.Clock),{size:14}),m[3]||(m[3]=e.createElementVNode("span",{class:"text-xs"},"Time",-1))]),e.createElementVNode("p",Xt,e.toDisplayString(s.value.startTime)+" - "+e.toDisplayString(s.value.endTime),1)]),e.createElementVNode("div",Zt,[e.createElementVNode("div",qt,[e.createVNode(e.unref(M.Users),{size:14}),m[4]||(m[4]=e.createElementVNode("span",{class:"text-xs"},"Spots",-1))]),e.createElementVNode("p",eo,e.toDisplayString(s.value.spots||1)+" "+e.toDisplayString(s.value.spots===1?"person":"people"),1)])])]),s.value.pricingOption?(e.openBlock(),e.createElementBlock("div",to,[m[6]||(m[6]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Package",-1)),e.createElementVNode("div",oo,[e.createElementVNode("div",no,[e.createElementVNode("div",so,[e.createElementVNode("div",ao,[e.createVNode(e.unref(M.Tag),{size:18,class:"text-primary"})]),e.createElementVNode("div",null,[e.createElementVNode("p",ro,e.toDisplayString(s.value.pricingOption.name),1),e.createElementVNode("p",io,e.toDisplayString(V(s.value.pricingOption.duration)),1)])]),e.createElementVNode("p",lo,e.toDisplayString(D(s.value.pricingOption.price)),1)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",co,[m[13]||(m[13]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Payment",-1)),e.createElementVNode("div",uo,[e.createElementVNode("div",po,[e.createElementVNode("div",mo,[m[7]||(m[7]=e.createElementVNode("span",{class:"text-muted-foreground"},"Base price",-1)),e.createElementVNode("span",null,e.toDisplayString(D(s.value.reservationBasePrice)),1)]),s.value.reservationAddOnsPrice?(e.openBlock(),e.createElementBlock("div",fo,[m[8]||(m[8]=e.createElementVNode("span",{class:"text-muted-foreground"},"Add-ons",-1)),e.createElementVNode("span",null,e.toDisplayString(D(s.value.reservationAddOnsPrice)),1)])):e.createCommentVNode("",!0),s.value.discount?(e.openBlock(),e.createElementBlock("div",vo,[m[9]||(m[9]=e.createElementVNode("span",null,"Discount",-1)),e.createElementVNode("span",null,"-"+e.toDisplayString(D(s.value.discount)),1)])):e.createCommentVNode("",!0)]),e.createVNode(ie),e.createElementVNode("div",go,[m[10]||(m[10]=e.createElementVNode("span",null,"Reservation Total",-1)),e.createElementVNode("span",null,e.toDisplayString(D(s.value.reservationPrice)),1)]),s.value.amountPaid!==void 0||s.value.amountDue!==void 0?(e.openBlock(),e.createBlock(ie,{key:0})):e.createCommentVNode("",!0),s.value.amountPaid!==void 0||s.value.amountDue!==void 0?(e.openBlock(),e.createElementBlock("div",ho,[s.value.amountPaid!==void 0?(e.openBlock(),e.createElementBlock("div",xo,[e.createElementVNode("span",Co,[e.createVNode(e.unref(M.CreditCard),{size:14}),m[11]||(m[11]=e.createTextVNode(" Amount paid ",-1))]),e.createElementVNode("span",No,e.toDisplayString(D(s.value.amountPaid)),1)])):e.createCommentVNode("",!0),s.value.amountDue!==void 0&&s.value.amountDue>0?(e.openBlock(),e.createElementBlock("div",Do,[e.createElementVNode("span",yo,[e.createVNode(e.unref(M.Receipt),{size:14}),m[12]||(m[12]=e.createTextVNode(" Amount due ",-1))]),e.createElementVNode("span",_o,e.toDisplayString(D(s.value.amountDue)),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createVNode(Ae,{class:"gap-2 sm:justify-between"},{default:e.withCtx(()=>[s.value.reservationStatus==="needs_approval"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Q,{variant:"destructive",onClick:y},{default:e.withCtx(()=>[e.createVNode(e.unref(M.Ban),{size:16}),m[14]||(m[14]=e.createTextVNode(" Reject Reservation ",-1))]),_:1}),e.createVNode(Q,{onClick:$},{default:e.withCtx(()=>[e.createVNode(e.unref(M.ClockCheck),{size:16}),m[15]||(m[15]=e.createTextVNode(" Approve Reservation ",-1))]),_:1})],64)):s.value.reservationStatus==="approved"?(e.openBlock(),e.createBlock(Ee,{key:1},{default:e.withCtx(()=>[e.createVNode(be,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(Q,{variant:"outline",class:"gap-2"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.MoreHorizontal),{size:16}),m[16]||(m[16]=e.createTextVNode(" Actions ",-1))]),_:1})]),_:1}),e.createVNode(we,{class:"w-60",align:"start"},{default:e.withCtx(()=>[e.createVNode(J,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...m[17]||(m[17]=[e.createTextVNode(" Reservation Actions ",-1)])]),_:1}),e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(H,{onClick:S,class:"gap-2 cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.Download),{size:16,class:"text-muted-foreground"}),m[18]||(m[18]=e.createElementVNode("span",null,"Download PDF",-1))]),_:1})]),_:1}),e.createVNode(le),e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(J,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...m[19]||(m[19]=[e.createTextVNode(" Communication ",-1)])]),_:1}),e.createVNode(H,{onClick:A,class:"gap-2 cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.MailCheck),{size:16,class:"text-muted-foreground"}),m[20]||(m[20]=e.createElementVNode("span",null,"(Re)send Confirmation Mail",-1))]),_:1})]),_:1}),e.unref(a)("manage-reservations")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(le),e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(J,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...m[21]||(m[21]=[e.createTextVNode(" Cancellation ",-1)])]),_:1}),e.createVNode(H,{onClick:k,class:"gap-2 cursor-pointer",variant:"destructive",disabled:w.value},{default:e.withCtx(()=>[e.createVNode(e.unref(M.XCircle),{size:16}),m[22]||(m[22]=e.createElementVNode("span",null,"Cancel Reservation",-1))]),_:1},8,["disabled"]),s.value?.reservationPrice&&s.value.reservationPrice>0?(e.openBlock(),e.createBlock(H,{key:0,onClick:re,class:"gap-2 cursor-pointer text-orange-600 dark:text-orange-400 focus:text-orange-600 dark:focus:text-orange-400",disabled:w.value},{default:e.withCtx(()=>[e.createVNode(e.unref(M.Gift),{class:"text-inherit",size:16}),m[23]||(m[23]=e.createElementVNode("span",null,"Cancel & Send Coupon",-1))]),_:1},8,["disabled"])):e.createCommentVNode("",!0)]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1},8,["open"]),e.createVNode(Vt,{ref_key:"cancelReservationDialog",ref:v,onConfirm:N},null,512),e.createVNode(Bt,{ref_key:"approveReservationDialog",ref:x,onConfirm:B},null,512),e.createVNode(Rt,{ref_key:"rejectReservationDialog",ref:f,onConfirm:j},null,512),e.createVNode(bt,{ref_key:"transferReservationDialog",ref:u},null,512)],64)}}});exports.Fuse=U;exports._sfc_main=Vo;