@oneclick.dev/cms-core-modules 0.0.104 → 0.0.106

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 (73) hide show
  1. package/dist/{Acquisition-CPlZzUBo.mjs → Acquisition-B2pM5vSp.mjs} +2 -2
  2. package/dist/{Acquisition-Br1Pfny3.js → Acquisition-Dt2rREU8.js} +1 -1
  3. package/dist/{Audience-BfkrmBuQ.js → Audience-Bs7b0TNm.js} +1 -1
  4. package/dist/{Audience-DTblSAiL.mjs → Audience-VLnUsQvW.mjs} +2 -2
  5. package/dist/{ContentEditor-B1nfKG_5.mjs → ContentEditor-BNLEv-qJ.mjs} +3119 -3098
  6. package/dist/{ContentEditor-DdFU8piH.js → ContentEditor-BUvvqfG1.js} +36 -36
  7. package/dist/{Create-qPeQxkdl.js → Create-89z41K73.js} +1 -1
  8. package/dist/{Create-BRBh0xjM.mjs → Create-Cn_Eufga.mjs} +5 -1
  9. package/dist/{Entries-C8UJkrVC.mjs → Entries-BdhUyJR5.mjs} +1 -1
  10. package/dist/{Entries-BaS6H6ak.js → Entries-CEXM_SkO.js} +1 -1
  11. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Ceoje52V.js +1 -0
  12. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DMGcRmm-.mjs +1255 -0
  13. package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-COrK1j0S.js +1 -0
  14. package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-Vb3q8EVv.mjs +330 -0
  15. package/dist/{Overview-CpHhuiaV.js → Overview-Bn1Xx3_j.js} +1 -1
  16. package/dist/{Overview-BrCwozey.js → Overview-DC9io1bk.js} +1 -1
  17. package/dist/Overview-Di84CsR5.mjs +476 -0
  18. package/dist/Overview-UoZHUMUz.js +1 -0
  19. package/dist/{Overview-kaMhsIUq.mjs → Overview-ejh4vUMT.mjs} +3 -3
  20. package/dist/{Overview-D_T3K6aq.mjs → Overview-lWAyyenp.mjs} +1 -1
  21. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CuwREvXD.js +349 -0
  22. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-GYNZ_yhD.mjs +3077 -0
  23. package/dist/{SeoHealth-BzcWd_w7.mjs → SeoHealth-DsbVdd2l.mjs} +3 -3
  24. package/dist/SeoHealth-az1YuNF2.js +1 -0
  25. package/dist/{TableView-DXmEF6pY.mjs → TableView-Bm6HaRHm.mjs} +1 -1
  26. package/dist/{TableView-CPAw3h8g.js → TableView-DQW0A1oG.js} +1 -1
  27. package/dist/agenda-IOqtALWf.js +1 -0
  28. package/dist/agenda-neyeLWv-.mjs +1165 -0
  29. package/dist/cms-core-modules.css +1 -1
  30. package/dist/{index-C4YUVWzJ.js → index-A2kp8Isi.js} +6 -6
  31. package/dist/{index-BuzLn4Km.js → index-B5aBwdxY.js} +2 -2
  32. package/dist/{index-p5Uqu8c2.mjs → index-BRdCrvcz.mjs} +52 -47
  33. package/dist/{index-D3L8WAJI.js → index-BiT55eU0.js} +2 -2
  34. package/dist/{index-CMk3uhUt.mjs → index-Bvxc5xv_.mjs} +153 -147
  35. package/dist/{index-DQYBP8Js.js → index-G7cIlnGN.js} +4 -4
  36. package/dist/{index-DjDCYQ_6.mjs → index-X6LV64jK.mjs} +102 -101
  37. package/dist/{index-_2lRVt_k.mjs → index-uOkqO74I.mjs} +105 -107
  38. package/dist/index-unsDfNYv.mjs +1187 -0
  39. package/dist/index-vHmvbEwa.js +35 -0
  40. package/dist/index.cjs.js +1 -1
  41. package/dist/index.mjs +14 -14
  42. package/dist/interpolation-CHn59tIC.js +1 -0
  43. package/dist/interpolation-w7IRDJwK.mjs +180 -0
  44. package/dist/orders-C65SlpJy.mjs +618 -0
  45. package/dist/orders-XVzWAgG1.js +1 -0
  46. package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +11 -2
  47. package/dist/src/appointments/components/edit/EventDialog/OrderDetailDialog.vue.d.ts +55 -0
  48. package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +6 -1
  49. package/dist/src/appointments/components/edit/NewReservationDialog/CustomerInformation.vue.d.ts +10 -0
  50. package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +25 -1
  51. package/dist/src/appointments/components/edit/NewReservationDialog/QuickReservationAdder.vue.d.ts +26 -0
  52. package/dist/src/appointments/components/edit/NewReservationDialog/ReservationLines.vue.d.ts +31 -0
  53. package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +3 -1
  54. package/dist/src/appointments/composables/useHorizontalScroll.d.ts +20 -0
  55. package/dist/src/lib/interpolation.d.ts +6 -0
  56. package/package.json +2 -2
  57. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-9Q7TMm4u.mjs +0 -401
  58. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DiNzGl-q.js +0 -1
  59. package/dist/Overview-BYMrsZjM.mjs +0 -332
  60. package/dist/Overview-t0pG5xjA.js +0 -1
  61. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cz_22Oce.mjs +0 -2927
  62. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DPPNc-Z5.js +0 -349
  63. package/dist/SeoHealth-09sEOu3G.js +0 -1
  64. package/dist/agenda-BNG05SAq.js +0 -1
  65. package/dist/agenda-D1RxMxBS.mjs +0 -1152
  66. package/dist/index-BtujSJeg.js +0 -35
  67. package/dist/index-dOdMm1pV.mjs +0 -1105
  68. package/dist/interpolation-DEDSLETn.mjs +0 -128
  69. package/dist/interpolation-DERg6Lwt.js +0 -1
  70. package/dist/orders-CzzcFQha.mjs +0 -559
  71. package/dist/orders-ETtbA4aQ.js +0 -1
  72. package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +0 -110
  73. package/dist/src/appointments/pages/edit/orders.vue.d.ts +0 -98
@@ -0,0 +1,349 @@
1
+ "use strict";const e=require("vue"),V=require("lucide-vue-next"),R=require("@oneclick.dev/cms-kit"),K=require("./index-ijdf0d9-.js");function z(n){return Array.isArray?Array.isArray(n):Be(n)==="[object Array]"}function He(n){if(typeof n=="string")return n;if(typeof n=="bigint")return n.toString();const t=n+"";return t=="0"&&1/n==-1/0?"-0":t}function ie(n){return n==null?"":He(n)}function I(n){return typeof n=="string"}function ee(n){return typeof n=="number"}function We(n){return n===!0||n===!1||Ke(n)&&Be(n)=="[object Boolean]"}function Ee(n){return typeof n=="object"}function Ke(n){return Ee(n)&&n!==null}function F(n){return n!=null}function q(n){return!n.trim().length}function Be(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const Ge="Incorrect 'index' type",Ye=n=>`Invalid value for key ${n}`,Qe=n=>`Pattern length exceeds max of ${n}.`,Xe=n=>`Missing ${n} property in key`,Je=n=>`Property 'weight' in key '${n}' must be a positive integer`,_e=Object.prototype.hasOwnProperty;class Ze{constructor(t){this._keys=[],this._keyMap={};let o=0;t.forEach(r=>{const i=Ae(r);this._keys.push(i),this._keyMap[i.id]=i,o+=i.weight}),this._keys.forEach(r=>{r.weight/=o})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ae(n){let t=null,o=null,r=null,i=1,l=null;if(I(n)||z(n))r=n,t=Ne(n),o=le(n);else{if(!_e.call(n,"name"))throw new Error(Xe("name"));const c=n.name;if(r=c,_e.call(n,"weight")&&(i=n.weight,i<=0))throw new Error(Je(c));t=Ne(c),o=le(c),l=n.getFn}return{path:t,id:o,weight:i,src:r,getFn:l}}function Ne(n){return z(n)?n:n.split(".")}function le(n){return z(n)?n.join("."):n}function qe(n,t){const o=[];let r=!1;const i=(l,c,d,u)=>{if(F(l))if(!c[d])o.push(u!==void 0?{v:l,i:u}:l);else{const f=c[d],a=l[f];if(!F(a))return;if(d===c.length-1&&(I(a)||ee(a)||We(a)||typeof a=="bigint"))o.push(u!==void 0?{v:ie(a),i:u}:ie(a));else if(z(a)){r=!0;for(let s=0,h=a.length;s<h;s+=1)i(a[s],c,d+1,s)}else c.length&&i(a,c,d+1,u)}};return i(n,I(t)?t.split("."):t,0),r?o:o[0]}const et={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},tt={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,t)=>n.score===t.score?n.idx<t.idx?-1:1:n.score<t.score?-1:1},ot={location:0,threshold:.6,distance:100},nt={useExtendedSearch:!1,useTokenSearch:!1,getFn:qe,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},C=Object.freeze({...tt,...et,...ot,...nt}),st=/[^ ]+/g;function rt(n=1,t=3){const o=new Map,r=Math.pow(10,t);return{get(i){const l=i.match(st).length;if(o.has(l))return o.get(l);const c=1/Math.pow(l,.5*n),d=parseFloat(Math.round(c*r)/r);return o.set(l,d),d},clear(){o.clear()}}}class ve{constructor({getFn:t=C.getFn,fieldNormWeight:o=C.fieldNormWeight}={}){this.norm=rt(o,3),this.getFn=t,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((o,r)=>{this._keysMap[o.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,I(this.docs[0])?this.docs.forEach((t,o)=>{this._addString(t,o)}):this.docs.forEach((t,o)=>{this._addObject(t,o)}),this.norm.clear())}add(t){const o=this.size();I(t)?this._addString(t,o):this._addObject(t,o)}removeAt(t){this.records.splice(t,1);for(let o=t,r=this.size();o<r;o+=1)this.records[o].i-=1}removeAll(t){for(let o=t.length-1;o>=0;o-=1)this.records.splice(t[o],1);for(let o=0,r=this.records.length;o<r;o+=1)this.records[o].i=o}getValueForItemAtKeyId(t,o){return t[this._keysMap[o]]}size(){return this.records.length}_addString(t,o){if(!F(t)||q(t))return;const r={v:t,i:o,n:this.norm.get(t)};this.records.push(r)}_addObject(t,o){const r={i:o,$:{}};this.keys.forEach((i,l)=>{const c=i.getFn?i.getFn(t):this.getFn(t,i.path);if(F(c)){if(z(c)){const d=[];for(let u=0,f=c.length;u<f;u+=1){const a=c[u];if(F(a)){if(I(a)){if(!q(a)){const s={v:a,i:u,n:this.norm.get(a)};d.push(s)}}else if(F(a.v)){const s=I(a.v)?a.v:ie(a.v);if(!q(s)){const h={v:s,i:a.i,n:this.norm.get(s)};d.push(h)}}}}r.$[l]=d}else if(I(c)&&!q(c)){const d={v:c,n:this.norm.get(c)};r.$[l]=d}}}),this.records.push(r)}toJSON(){return{keys:this.keys.map(({getFn:t,...o})=>o),records:this.records}}}function Se(n,t,{getFn:o=C.getFn,fieldNormWeight:r=C.fieldNormWeight}={}){const i=new ve({getFn:o,fieldNormWeight:r});return i.setKeys(n.map(Ae)),i.setSources(t),i.create(),i}function at(n,{getFn:t=C.getFn,fieldNormWeight:o=C.fieldNormWeight}={}){const{keys:r,records:i}=n,l=new ve({getFn:t,fieldNormWeight:o});return l.setKeys(r),l.setIndexRecords(i),l}function it(n=[],t=C.minMatchCharLength){const o=[];let r=-1,i=-1,l=0;for(let c=n.length;l<c;l+=1){const d=n[l];d&&r===-1?r=l:!d&&r!==-1&&(i=l-1,i-r+1>=t&&o.push([r,i]),r=-1)}return n[l-1]&&l-r>=t&&o.push([r,l-1]),o}const H=32;function lt(n,t,o,{location:r=C.location,distance:i=C.distance,threshold:l=C.threshold,findAllMatches:c=C.findAllMatches,minMatchCharLength:d=C.minMatchCharLength,includeMatches:u=C.includeMatches,ignoreLocation:f=C.ignoreLocation}={}){if(t.length>H)throw new Error(Qe(H));const a=t.length,s=n.length,h=Math.max(0,Math.min(r,s));let m=l,p=h;const g=(b,B)=>{const x=b/a;if(f)return x;const S=Math.abs(h-B);return i?x+S/i:S?1:x},y=d>1||u,D=y?Array(s):[];let E;for(;(E=n.indexOf(t,p))>-1;){const b=g(0,E);if(m=Math.min(b,m),p=E+a,y){let B=0;for(;B<a;)D[E+B]=1,B+=1}}p=-1;let N=[],k=1,A=a+s;const w=1<<a-1;for(let b=0;b<a;b+=1){let B=0,x=A;for(;B<x;)g(b,h+x)<=m?B=x:A=x,x=Math.floor((A-B)/2+B);A=x;let S=Math.max(1,h-x+1);const G=c?s:Math.min(h+x,s)+a,j=Array(G+2);j[G+1]=(1<<b)-1;for(let T=G;T>=S;T-=1){const W=T-1,X=o[n[W]];if(y&&(D[W]=+!!X),j[T]=(j[T+1]<<1|1)&X,b&&(j[T]|=(N[T+1]|N[T])<<1|1|N[T+1]),j[T]&w&&(k=g(b,W),k<=m)){if(m=k,p=W,p<=h)break;S=Math.max(1,2*h-p)}}if(g(b+1,h)>m)break;N=j}const $={isMatch:p>=0,score:Math.max(.001,k)};if(y){const b=it(D,d);b.length?u&&($.indices=b):$.isMatch=!1}return $}function ct(n){const t={};for(let o=0,r=n.length;o<r;o+=1){const i=n.charAt(o);t[i]=(t[i]||0)|1<<r-o-1}return t}function ge(n){if(n.length<=1)return n;n.sort((o,r)=>o[0]-r[0]||o[1]-r[1]);const t=[n[0]];for(let o=1,r=n.length;o<r;o+=1){const i=t[t.length-1],l=n[o];l[0]<=i[1]+1?i[1]=Math.max(i[1],l[1]):t.push(l)}return t}const Me={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},ut=new RegExp("["+Object.keys(Me).join("")+"]","g"),Q=String.prototype.normalize?n=>n.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,"").replace(ut,t=>Me[t]):n=>n;class xe{constructor(t,{location:o=C.location,threshold:r=C.threshold,distance:i=C.distance,includeMatches:l=C.includeMatches,findAllMatches:c=C.findAllMatches,minMatchCharLength:d=C.minMatchCharLength,isCaseSensitive:u=C.isCaseSensitive,ignoreDiacritics:f=C.ignoreDiacritics,ignoreLocation:a=C.ignoreLocation}={}){if(this.options={location:o,threshold:r,distance:i,includeMatches:l,findAllMatches:c,minMatchCharLength:d,isCaseSensitive:u,ignoreDiacritics:f,ignoreLocation:a},t=u?t:t.toLowerCase(),t=f?Q(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const s=(m,p)=>{this.chunks.push({pattern:m,alphabet:ct(m),startIndex:p})},h=this.pattern.length;if(h>H){let m=0;const p=h%H,g=h-p;for(;m<g;)s(this.pattern.substr(m,H),m),m+=H;if(p){const y=h-H;s(this.pattern.substr(y),y)}}else s(this.pattern,0)}searchIn(t){const{isCaseSensitive:o,ignoreDiacritics:r,includeMatches:i}=this.options;if(t=o?t:t.toLowerCase(),t=r?Q(t):t,this.pattern===t){const g={isMatch:!0,score:0};return i&&(g.indices=[[0,t.length-1]]),g}const{location:l,distance:c,threshold:d,findAllMatches:u,minMatchCharLength:f,ignoreLocation:a}=this.options,s=[];let h=0,m=!1;this.chunks.forEach(({pattern:g,alphabet:y,startIndex:D})=>{const{isMatch:E,score:N,indices:k}=lt(t,g,y,{location:l+D,distance:c,threshold:d,findAllMatches:u,minMatchCharLength:f,includeMatches:i,ignoreLocation:a});E&&(m=!0),h+=N,E&&k&&s.push(...k)});const p={isMatch:m,score:m?h/this.chunks.length:1};return m&&i&&(p.indices=ge(s)),p}}class L{constructor(t){this.pattern=t}static isMultiMatch(t){return Ve(t,this.multiRegex)}static isSingleMatch(t){return Ve(t,this.singleRegex)}search(t){return{isMatch:!1,score:1}}}function Ve(n,t){const o=n.match(t);return o?o[1]:null}class dt extends L{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const o=t===this.pattern;return{isMatch:o,score:o?0:1,indices:[0,this.pattern.length-1]}}}class mt extends L{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class pt extends L{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const o=t.startsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,this.pattern.length-1]}}}class ft extends L{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const o=!t.startsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class ht extends L{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const o=t.endsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class vt extends L{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const o=!t.endsWith(this.pattern);return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class Ie extends L{constructor(t,{location:o=C.location,threshold:r=C.threshold,distance:i=C.distance,includeMatches:l=C.includeMatches,findAllMatches:c=C.findAllMatches,minMatchCharLength:d=C.minMatchCharLength,isCaseSensitive:u=C.isCaseSensitive,ignoreDiacritics:f=C.ignoreDiacritics,ignoreLocation:a=C.ignoreLocation}={}){super(t),this._bitapSearch=new xe(t,{location:o,threshold:r,distance:i,includeMatches:l,findAllMatches:c,minMatchCharLength:d,isCaseSensitive:u,ignoreDiacritics:f,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class $e extends L{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let o=0,r;const i=[],l=this.pattern.length;for(;(r=t.indexOf(this.pattern,o))>-1;)o=r+l,i.push([r,o-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}}const ce=[dt,$e,pt,ft,vt,ht,mt,Ie],ke=ce.length,gt="\0",xt="|";function Ct(n){const t=[],o=n.length;let r=0;for(;r<o;){for(;r<o&&n[r]===" ";)r++;if(r>=o)break;let i=r;for(;i<o&&n[i]!==" "&&n[i]!=='"';)i++;if(i<o&&n[i]==='"'){for(i++;i<o;){if(n[i]==='"'){const l=i+1;if(l>=o||n[l]===" "){i++;break}if(n[l]==="$"&&(l+1>=o||n[l+1]===" ")){i+=2;break}}i++}t.push(n.substring(r,i)),r=i}else{for(;i<o&&n[i]!==" ";)i++;t.push(n.substring(r,i)),r=i}}return t}function yt(n,t={}){return n.replace(/\\\|/g,gt).split(xt).map(r=>{const i=r.replace(/\u0000/g,"|"),l=Ct(i.trim()).filter(d=>d&&!!d.trim()),c=[];for(let d=0,u=l.length;d<u;d+=1){const f=l[d];let a=!1,s=-1;for(;!a&&++s<ke;){const h=ce[s],m=h.isMultiMatch(f);m&&(c.push(new h(m,t)),a=!0)}if(!a)for(s=-1;++s<ke;){const h=ce[s],m=h.isSingleMatch(f);if(m){c.push(new h(m,t));break}}}return c})}const _t=new Set([Ie.type,$e.type]);class Nt{constructor(t,{isCaseSensitive:o=C.isCaseSensitive,ignoreDiacritics:r=C.ignoreDiacritics,includeMatches:i=C.includeMatches,minMatchCharLength:l=C.minMatchCharLength,ignoreLocation:c=C.ignoreLocation,findAllMatches:d=C.findAllMatches,location:u=C.location,threshold:f=C.threshold,distance:a=C.distance}={}){this.query=null,this.options={isCaseSensitive:o,ignoreDiacritics:r,includeMatches:i,minMatchCharLength:l,findAllMatches:d,ignoreLocation:c,location:u,threshold:f,distance:a},t=o?t:t.toLowerCase(),t=r?Q(t):t,this.pattern=t,this.query=yt(this.pattern,this.options)}static condition(t,o){return o.useExtendedSearch}searchIn(t){const o=this.query;if(!o)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i,ignoreDiacritics:l}=this.options;t=i?t:t.toLowerCase(),t=l?Q(t):t;let c=0;const d=[];let u=0,f=!1;for(let a=0,s=o.length;a<s;a+=1){const h=o[a];d.length=0,c=0,f=!1;for(let m=0,p=h.length;m<p;m+=1){const g=h[m],{isMatch:y,indices:D,score:E}=g.search(t);if(y){c+=1,u+=E;const N=g.constructor.type;N.startsWith("inverse")&&(f=!0),r&&(_t.has(N)?d.push(...D):d.push(D))}else{u=0,c=0,d.length=0,f=!1;break}}if(c){const m={isMatch:!0,score:u/c};return f&&(m.hasInverse=!0),r&&(m.indices=ge(d)),m}}return{isMatch:!1,score:1}}}const ue=[];function Ce(...n){ue.push(...n)}function te(n,t){for(let o=0,r=ue.length;o<r;o+=1){const i=ue[o];if(i.condition(n,t))return new i(n,t)}return new xe(n,t)}const oe={AND:"$and",OR:"$or"},de={PATH:"$path",PATTERN:"$val"},me=n=>!!(n[oe.AND]||n[oe.OR]),Vt=n=>!!n[de.PATH],kt=n=>!z(n)&&Ee(n)&&!me(n),be=n=>({[oe.AND]:Object.keys(n).map(t=>({[t]:n[t]}))});function Fe(n,t,{auto:o=!0}={}){const r=i=>{if(I(i)){const u={keyId:null,pattern:i};return o&&(u.searcher=te(i,t)),u}const l=Object.keys(i),c=Vt(i);if(!c&&l.length>1&&!me(i))return r(be(i));if(kt(i)){const u=c?i[de.PATH]:l[0],f=c?i[de.PATTERN]:i[u];if(!I(f))throw new Error(Ye(u));const a={keyId:le(u),pattern:f};return o&&(a.searcher=te(f,t)),a}const d={children:[],operator:l[0]};return l.forEach(u=>{const f=i[u];z(f)&&f.forEach(a=>{d.children.push(r(a))})}),d};return me(n)||(n=be(n)),r(n)}function pe(n,{ignoreFieldNorm:t=C.ignoreFieldNorm}){let o=1;return n.forEach(({key:r,norm:i,score:l})=>{const c=r?r.weight:null;o*=Math.pow(l===0&&c?Number.EPSILON:l,(c||1)*(t?1:i))}),o}function bt(n,{ignoreFieldNorm:t=C.ignoreFieldNorm}){n.forEach(o=>{o.score=pe(o.matches,{ignoreFieldNorm:t})})}class Dt{constructor(t){this.limit=t,this.heap=[]}get size(){return this.heap.length}shouldInsert(t){return this.size<this.limit||t<this.heap[0].score}insert(t){this.size<this.limit?(this.heap.push(t),this._bubbleUp(this.size-1)):t.score<this.heap[0].score&&(this.heap[0]=t,this._sinkDown(0))}extractSorted(t){return this.heap.sort(t)}_bubbleUp(t){const o=this.heap;for(;t>0;){const r=t-1>>1;if(o[t].score<=o[r].score)break;const i=o[t];o[t]=o[r],o[r]=i,t=r}}_sinkDown(t){const o=this.heap,r=o.length;let i=t;do{t=i;const l=2*t+1,c=2*t+2;if(l<r&&o[l].score>o[i].score&&(i=l),c<r&&o[c].score>o[i].score&&(i=c),i!==t){const d=o[t];o[t]=o[i],o[i]=d}}while(i!==t)}}function wt(n,t){const o=n.matches;t.matches=[],F(o)&&o.forEach(r=>{if(!F(r.indices)||!r.indices.length)return;const{indices:i,value:l}=r,c={indices:i,value:l};r.key&&(c.key=r.key.src),r.idx>-1&&(c.refIndex=r.idx),t.matches.push(c)})}function Et(n,t){t.score=n.score}function Bt(n,t,{includeMatches:o=C.includeMatches,includeScore:r=C.includeScore}={}){const i=[];return o&&i.push(wt),r&&i.push(Et),n.map(l=>{const{idx:c}=l,d={item:t[c],refIndex:c};return i.length&&i.forEach(u=>{u(l,d)}),d})}const At=/\b\w+\b/g;function fe({isCaseSensitive:n=!1,ignoreDiacritics:t=!1}={}){return{tokenize(o){return n||(o=o.toLowerCase()),t&&(o=Q(o)),o.match(At)||[]}}}function St(n,t,o){const r=new Map,i=new Map;let l=0;function c(d,u,f,a){const s=o.tokenize(d);if(!s.length)return;l++;const h=new Map;for(const m of s)h.set(m,(h.get(m)||0)+1);for(const[m,p]of h){const g={docIdx:u,keyIdx:f,subIdx:a,tf:p};let y=r.get(m);y||(y=[],r.set(m,y)),y.push(g),i.set(m,(i.get(m)||0)+1)}}for(const d of n){const{i:u,v:f,$:a}=d;if(f!==void 0){c(f,u,-1,-1);continue}if(a)for(let s=0;s<t;s++){const h=a[s];if(h)if(Array.isArray(h))for(const m of h)c(m.v,u,s,m.i??-1);else c(h.v,u,s,-1)}}return{terms:r,fieldCount:l,df:i}}function Mt(n,t,o,r){const{i,v:l,$:c}=t;function d(u,f,a){const s=r.tokenize(u);if(!s.length)return;n.fieldCount++;const h=new Map;for(const m of s)h.set(m,(h.get(m)||0)+1);for(const[m,p]of h){const g={docIdx:i,keyIdx:f,subIdx:a,tf:p};let y=n.terms.get(m);y||(y=[],n.terms.set(m,y)),y.push(g),n.df.set(m,(n.df.get(m)||0)+1)}}if(l!==void 0){d(l,-1,-1);return}if(c)for(let u=0;u<o;u++){const f=c[u];if(f)if(Array.isArray(f))for(const a of f)d(a.v,u,a.i??-1);else d(f.v,u,-1)}}function De(n,t){for(const[o,r]of n.terms){const i=r.filter(c=>c.docIdx!==t),l=r.length-i.length;l>0&&(n.fieldCount-=l,n.df.set(o,(n.df.get(o)||0)-l),i.length===0?(n.terms.delete(o),n.df.delete(o)):n.terms.set(o,i))}}class P{constructor(t,o,r){this.options={...C,...o},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Ze(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,r),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const o=this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options,r=te(t,o);return this._lastQuery=t,this._lastSearcher=r,r}setCollection(t,o){if(this._docs=t,o&&!(o instanceof ve))throw new Error(Ge);if(this._myIndex=o||Se(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const r=fe({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=St(this._myIndex.records,this._myIndex.keys.length,r)}}add(t){if(F(t)&&(this._docs.push(t),this._myIndex.add(t),this._invertedIndex)){const o=this._myIndex.records[this._myIndex.records.length-1],r=fe({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});Mt(this._invertedIndex,o,this._myIndex.keys.length,r)}}remove(t=()=>!1){const o=[],r=[];for(let i=0,l=this._docs.length;i<l;i+=1)t(this._docs[i],i)&&(o.push(this._docs[i]),r.push(i));if(r.length){if(this._invertedIndex)for(const i of r)De(this._invertedIndex,i);for(let i=r.length-1;i>=0;i-=1)this._docs.splice(r[i],1);this._myIndex.removeAll(r)}return o}removeAt(t){this._invertedIndex&&De(this._invertedIndex,t);const o=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),o}getIndex(){return this._myIndex}search(t,o){const{limit:r=-1}=o||{},{includeMatches:i,includeScore:l,shouldSort:c,sortFn:d,ignoreFieldNorm:u}=this.options;if(I(t)&&!t.trim()){let s=this._docs.map((h,m)=>({item:h,refIndex:m}));return ee(r)&&r>-1&&(s=s.slice(0,r)),s}const f=ee(r)&&r>0&&I(t);let a;if(f){const s=new Dt(r);I(this._docs[0])?this._searchStringList(t,{heap:s,ignoreFieldNorm:u}):this._searchObjectList(t,{heap:s,ignoreFieldNorm:u}),a=s.extractSorted(d)}else a=I(t)?I(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),bt(a,{ignoreFieldNorm:u}),c&&a.sort(d),ee(r)&&r>-1&&(a=a.slice(0,r));return Bt(a,this._docs,{includeMatches:i,includeScore:l})}_searchStringList(t,{heap:o,ignoreFieldNorm:r}={}){const i=this._getSearcher(t),{records:l}=this._myIndex,c=o?null:[];return l.forEach(({v:d,i:u,n:f})=>{if(!F(d))return;const{isMatch:a,score:s,indices:h}=i.searchIn(d);if(a){const m={item:d,idx:u,matches:[{score:s,value:d,norm:f,indices:h}]};o?(m.score=pe(m.matches,{ignoreFieldNorm:r}),o.shouldInsert(m.score)&&o.insert(m)):c.push(m)}}),c}_searchLogical(t){const o=Fe(t,this.options),r=(d,u,f)=>{if(!("children"in d)){const{keyId:m,searcher:p}=d;let g;return m===null?(g=[],this._myIndex.keys.forEach((y,D)=>{g.push(...this._findMatches({key:y,value:u[D],searcher:p}))})):g=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(u,m),searcher:p}),g&&g.length?[{idx:f,item:u,matches:g}]:[]}const{children:a,operator:s}=d,h=[];for(let m=0,p=a.length;m<p;m+=1){const g=a[m],y=r(g,u,f);if(y.length)h.push(...y);else if(s===oe.AND)return[]}return h},i=this._myIndex.records,l=new Map,c=[];return i.forEach(({$:d,i:u})=>{if(F(d)){const f=r(o,d,u);f.length&&(l.has(u)||(l.set(u,{idx:u,item:d,matches:[]}),c.push(l.get(u))),f.forEach(({matches:a})=>{l.get(u).matches.push(...a)}))}}),c}_searchObjectList(t,{heap:o,ignoreFieldNorm:r}={}){const i=this._getSearcher(t),{keys:l,records:c}=this._myIndex,d=o?null:[];return c.forEach(({$:u,i:f})=>{if(!F(u))return;const a=[];let s=!1,h=!1;if(l.forEach((m,p)=>{const g=this._findMatches({key:m,value:u[p],searcher:i});g.length?(a.push(...g),g[0].hasInverse&&(h=!0)):s=!0}),!(h&&s)&&a.length){const m={idx:f,item:u,matches:a};o?(m.score=pe(m.matches,{ignoreFieldNorm:r}),o.shouldInsert(m.score)&&o.insert(m)):d.push(m)}}),d}_findMatches({key:t,value:o,searcher:r}){if(!F(o))return[];const i=[];if(z(o))o.forEach(({v:l,i:c,n:d})=>{if(!F(l))return;const{isMatch:u,score:f,indices:a,hasInverse:s}=r.searchIn(l);u&&i.push({score:f,key:t,value:l,idx:c,norm:d,indices:a,hasInverse:s})});else{const{v:l,n:c}=o,{isMatch:d,score:u,indices:f,hasInverse:a}=r.searchIn(l);d&&i.push({score:u,key:t,value:l,norm:c,indices:f,hasInverse:a})}return i}}class It{static condition(t,o){return o.useTokenSearch}constructor(t,o){this.options=o,this.analyzer=fe({isCaseSensitive:o.isCaseSensitive,ignoreDiacritics:o.ignoreDiacritics});const r=this.analyzer.tokenize(t),i=o._invertedIndex,{df:l,fieldCount:c}=i;this.termSearchers=[],this.idfWeights=[];for(const d of r){this.termSearchers.push(new xe(d,{location:o.location,threshold:o.threshold,distance:o.distance,includeMatches:o.includeMatches,findAllMatches:o.findAllMatches,minMatchCharLength:o.minMatchCharLength,isCaseSensitive:o.isCaseSensitive,ignoreDiacritics:o.ignoreDiacritics,ignoreLocation:!0}));const u=l.get(d)||0,f=Math.log(1+(c-u+.5)/(u+.5));this.idfWeights.push(f)}}searchIn(t){if(!this.termSearchers.length)return{isMatch:!1,score:1};const o=[];let r=0,i=0,l=0;for(let u=0;u<this.termSearchers.length;u++){const f=this.termSearchers[u].searchIn(t),a=this.idfWeights[u];i+=a,f.isMatch&&(l++,r+=a*(1-f.score),f.indices&&o.push(...f.indices))}if(l===0)return{isMatch:!1,score:1};const c=i>0?1-r/i:0,d={isMatch:!0,score:Math.max(.001,c)};return this.options.includeMatches&&o.length&&(d.indices=ge(o)),d}}P.version="7.3.0";P.createIndex=Se;P.parseIndex=at;P.config=C;P.match=function(n,t,o){return te(n,{...C,...o}).searchIn(t)};P.parseQuery=Fe;Ce(Nt);Ce(It);P.use=function(...n){n.forEach(t=>Ce(t))};const U=n=>n==null?"—":`€${n.toFixed(2)}`,$t=n=>{if(!n)return"—";if(n<60)return`${n} min`;const t=Math.floor(n/60),o=n%60;return o>0?`${t}h ${o}min`:`${t}h`},Ft=n=>{switch(n){case"confirmed":return"Confirmed";case"pending":return"Pending";case"cancelled":return"Cancelled";default:return n||"Unknown"}},we=n=>{switch(n){case"confirmed":return"#16a34a";case"pending":return"#ca8a04";case"cancelled":return"#dc2626";default:return"#6b7280"}},Tt=(n,t={})=>{const o=`${n.customerInfo?.firstName||""} ${n.customerInfo?.lastName||""}`.trim()||"Unknown Customer",r=n.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 ${r}</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 #${r}</div>
219
+ <div
220
+ class="status-badge"
221
+ style="background-color: ${we(n.status)}20; color: ${we(n.status)};"
222
+ >
223
+ ${Ft(n.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">${o}</div>
232
+ <div class="contact-info">
233
+ ${n.customerInfo?.email?`<div>Email: <a href="mailto:${n.customerInfo.email}">${n.customerInfo.email}</a></div>`:""}
234
+ ${n.customerInfo?.phone?`<div>Phone: <a href="tel:${n.customerInfo.phone}">${n.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">${n.startTime} - ${n.endTime}</div>
249
+ </div>
250
+ <div class="info-card">
251
+ <div class="info-label">Spots</div>
252
+ <div class="info-value">${n.spots||1} ${(n.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
+ ${n.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">${n.pricingOption.name}</div>
276
+ <div class="package-duration">${$t(n.pricingOption.duration)}</div>
277
+ </div>
278
+ <div class="package-price">${U(n.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">${U(n.reservationBasePrice)}</span>
290
+ </div>
291
+ ${n.reservationAddOnsPrice?`
292
+ <div class="payment-row">
293
+ <span class="payment-label">Add-ons</span>
294
+ <span class="payment-value">${U(n.reservationAddOnsPrice)}</span>
295
+ </div>
296
+ `:""}
297
+ ${n.discount?`
298
+ <div class="payment-row">
299
+ <span class="payment-label">Discount</span>
300
+ <span class="payment-value green">-${U(n.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>${U(n.reservationPrice)}</span>
309
+ </div>
310
+
311
+ ${n.amountPaid!==void 0||n.amountDue!==void 0?`
312
+ <div class="payment-divider"></div>
313
+
314
+ ${n.amountPaid!==void 0?`
315
+ <div class="payment-row">
316
+ <span class="payment-label">Amount paid</span>
317
+ <span class="payment-value green">${U(n.amountPaid)}</span>
318
+ </div>
319
+ `:""}
320
+
321
+ ${n.amountDue!==void 0&&n.amountDue>0?`
322
+ <div class="payment-row">
323
+ <span class="payment-label">Amount due</span>
324
+ <span class="payment-value orange">${U(n.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
+ `,c=window.open("","_blank");c&&(c.document.write(l),c.document.close(),c.onload=()=>{c.print()})},Rt={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},jt={class:"grid gap-2"},Ot={class:"grid gap-2"},zt={class:"grid gap-2"},Lt=e.defineComponent({__name:"CancelReservationDialog",emits:["confirm"],setup(n,{expose:t,emit:o}){const{config:r}=R.useModule(),{sendMail:i}=R.useMailer(r.mailAccount),l=o,c=e.ref(!1),d=e.ref(!1),u=e.ref(""),f=e.ref(""),a=e.ref(""),s=m=>{d.value=!r.mailAccount,c.value=!0,m&&(u.value=m.customerInfo?.email,f.value="Cancellation of your reservation - "+new Date(m.date)?.toDateString(),a.value=`Dear ${m.customerInfo?.firstName??""} ${m.customerInfo?.lastName??""},
338
+
339
+ We are writing to inform you that your reservation scheduled for ${new Date(m.date)?.toDateString()} at ${m.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.`)},h=()=>{if(!d.value){if(!u.value||!f.value||!a.value)return alert("Please fill in all the fields.");i({to:u.value,subject:f.value,body:a.value})}c.value=!1;const{$confetti:m}=useNuxtApp();m(),l("confirm")};return t({openDialog:s}),(m,p)=>{const g=e.resolveComponent("DialogTitle"),y=e.resolveComponent("DialogDescription"),D=e.resolveComponent("DialogHeader"),E=e.resolveComponent("Checkbox"),N=e.resolveComponent("Label"),k=e.resolveComponent("Input"),A=e.resolveComponent("Textarea"),w=e.resolveComponent("Button"),$=e.resolveComponent("DialogFooter"),b=e.resolveComponent("DialogScrollContent"),B=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(B,{open:c.value,"onUpdate:open":p[5]||(p[5]=x=>c.value=x)},{default:e.withCtx(()=>[e.createVNode(b,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[...p[6]||(p[6]=[e.createTextVNode(" Cancel Reservation ",-1)])]),_:1}),e.createVNode(y)]),_:1}),e.createElementVNode("div",Rt,[e.createVNode(E,{modelValue:d.value,"onUpdate:modelValue":p[0]||(p[0]=x=>d.value=x),id:"cancel-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(r).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(N,{for:"cancel-dialog-skip-mail",class:"py-4 pl-2 pr-4"},{default:e.withCtx(()=>[...p[7]||(p[7]=[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",jt,[e.createVNode(N,{for:"cancel-dialog-email"},{default:e.withCtx(()=>[...p[8]||(p[8]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(k,{modelValue:u.value,"onUpdate:modelValue":p[1]||(p[1]=x=>u.value=x),disabled:d.value,id:"cancel-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Ot,[e.createVNode(N,{for:"cancel-dialog-subject"},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(k,{modelValue:f.value,"onUpdate:modelValue":p[2]||(p[2]=x=>f.value=x),disabled:d.value,id:"cancel-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",zt,[e.createVNode(N,{for:"cancel-dialog-body"},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode(A,{modelValue:a.value,"onUpdate:modelValue":p[3]||(p[3]=x=>a.value=x),disabled:d.value,id:"cancel-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode($,null,{default:e.withCtx(()=>[e.createVNode(w,{variant:"outline",onClick:p[4]||(p[4]=x=>c.value=!1)},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(w,{variant:"destructive",onClick:h},{default:e.withCtx(()=>[...p[12]||(p[12]=[e.createTextVNode("Cancel reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),Pt={class:"pb-4"},Ut={class:"mt-6 grid gap-4 md:grid-cols-3"},Ht={class:"space-y-2"},Wt={class:"space-y-2"},Kt={class:"space-y-2"},Gt={class:"mt-4 rounded-lg border bg-muted/30 p-4"},Yt={class:"mt-2 text-sm text-foreground"},Qt=e.defineComponent({__name:"TransferReservationDialog",setup(n,{expose:t}){const o=e.ref(!1),r=e.ref("2026-05-14"),i=e.ref("09:30"),l=e.ref("resource-2"),c=["08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00"],d=[{value:"resource-1",label:"BOX 1"},{value:"resource-2",label:"BOX 2"},{value:"resource-3",label:"BOX 3"}],u=e.computed(()=>d.find(a=>a.value===l.value)?.label??"No resource selected");return t({openDialog:()=>{o.value=!0}}),(a,s)=>{const h=e.resolveComponent("DialogTitle"),m=e.resolveComponent("DialogDescription"),p=e.resolveComponent("DialogHeader"),g=e.resolveComponent("Label"),y=e.resolveComponent("Input"),D=e.resolveComponent("SelectValue"),E=e.resolveComponent("SelectTrigger"),N=e.resolveComponent("SelectItem"),k=e.resolveComponent("SelectContent"),A=e.resolveComponent("Select"),w=e.resolveComponent("Button"),$=e.resolveComponent("DialogFooter"),b=e.resolveComponent("DialogScrollContent"),B=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(B,{open:o.value,"onUpdate:open":s[5]||(s[5]=x=>o.value=x)},{default:e.withCtx(()=>[e.createVNode(b,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(h,null,{default:e.withCtx(()=>[...s[6]||(s[6]=[e.createTextVNode(" Transfer Reservation ",-1)])]),_:1}),e.createVNode(m)]),_:1}),e.createElementVNode("div",Pt,[s[11]||(s[11]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"}," This will transfer the reservation to another date, time or resource. The customer will receive an email notification about the change. ",-1)),e.createElementVNode("div",Ut,[e.createElementVNode("div",Ht,[e.createVNode(g,{for:"transfer-reservation-date"},{default:e.withCtx(()=>[...s[7]||(s[7]=[e.createTextVNode("Date",-1)])]),_:1}),e.createVNode(y,{id:"transfer-reservation-date",modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=x=>r.value=x),type:"date"},null,8,["modelValue"])]),e.createElementVNode("div",Wt,[e.createVNode(g,{for:"transfer-reservation-hour"},{default:e.withCtx(()=>[...s[8]||(s[8]=[e.createTextVNode("Hour",-1)])]),_:1}),e.createVNode(A,{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=x=>i.value=x)},{default:e.withCtx(()=>[e.createVNode(E,{id:"transfer-reservation-hour"},{default:e.withCtx(()=>[e.createVNode(D,{placeholder:"Select an hour"})]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(c,x=>e.createVNode(N,{key:x,value:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",Kt,[e.createVNode(g,{for:"transfer-reservation-resource"},{default:e.withCtx(()=>[...s[9]||(s[9]=[e.createTextVNode("Resource",-1)])]),_:1}),e.createVNode(A,{modelValue:l.value,"onUpdate:modelValue":s[2]||(s[2]=x=>l.value=x)},{default:e.withCtx(()=>[e.createVNode(E,{id:"transfer-reservation-resource"},{default:e.withCtx(()=>[e.createVNode(D,{placeholder:"Select a resource"})]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(d,x=>e.createVNode(N,{key:x.value,value:x.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["modelValue"])])]),e.createElementVNode("div",Gt,[s[10]||(s[10]=e.createElementVNode("p",{class:"text-xs font-medium uppercase tracking-[0.2em] text-muted-foreground"}," Preview ",-1)),e.createElementVNode("p",Yt," Reservation will be moved to "+e.toDisplayString(r.value||"no date selected")+" at "+e.toDisplayString(i.value||"no hour selected")+" with "+e.toDisplayString(u.value)+". ",1)])]),e.createVNode($,null,{default:e.withCtx(()=>[e.createVNode(w,{variant:"outline",onClick:s[3]||(s[3]=x=>o.value=!1)},{default:e.withCtx(()=>[...s[12]||(s[12]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(w,{onClick:s[4]||(s[4]=x=>o.value=!1)},{default:e.withCtx(()=>[...s[13]||(s[13]=[e.createTextVNode("Transfer reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),Xt={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},Jt={class:"grid gap-2"},Zt={class:"grid gap-2"},qt={class:"grid gap-2"},eo=e.defineComponent({__name:"ApproveReservationDialog",emits:["confirm"],setup(n,{expose:t,emit:o}){const{config:r}=R.useModule(),{sendMail:i}=R.useMailer(r.mailAccount),l=o,c=e.ref(!1),d=e.ref("approve"),u=e.ref(!1),f=e.ref(""),a=e.ref(""),s=e.ref(""),h=(p,g)=>{u.value=!r.mailAccount,c.value=!0,p&&(g||(g="approve"),d.value=g,f.value=p.customerInfo?.email,a.value="Confirmation: Your reservation for "+new Date(p.date)?.toDateString(),s.value=`Dear ${p.customerInfo?.firstName??""} ${p.customerInfo?.lastName??""},
342
+
343
+ This email confirms your reservation for ${new Date(p.date)?.toDateString()} at ${p.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.`)},m=()=>{if(!u.value){if(!f.value||!a.value||!s.value)return alert("Please fill in all the fields.");i({to:f.value,subject:a.value,body:s.value})}c.value=!1;const{$confetti:p}=useNuxtApp();p(),l("confirm")};return t({openDialog:h}),(p,g)=>{const y=e.resolveComponent("DialogTitle"),D=e.resolveComponent("DialogDescription"),E=e.resolveComponent("DialogHeader"),N=e.resolveComponent("Checkbox"),k=e.resolveComponent("Label"),A=e.resolveComponent("Input"),w=e.resolveComponent("Textarea"),$=e.resolveComponent("Button"),b=e.resolveComponent("DialogFooter"),B=e.resolveComponent("DialogScrollContent"),x=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(x,{open:c.value,"onUpdate:open":g[5]||(g[5]=S=>c.value=S)},{default:e.withCtx(()=>[e.createVNode(B,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[e.createVNode(y,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value==="approve"?"Approve Reservation":"Resend Confirmation Email"),1)]),_:1}),e.createVNode(D)]),_:1}),e.createElementVNode("div",Xt,[e.createVNode(N,{modelValue:u.value,"onUpdate:modelValue":g[0]||(g[0]=S=>u.value=S),id:"reject-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(r).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(k,{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":u.value}])},[e.createElementVNode("div",Jt,[e.createVNode(k,{for:"approve-dialog-email"},{default:e.withCtx(()=>[...g[7]||(g[7]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(A,{modelValue:f.value,"onUpdate:modelValue":g[1]||(g[1]=S=>f.value=S),disabled:u.value,id:"approve-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Zt,[e.createVNode(k,{for:"approve-dialog-subject"},{default:e.withCtx(()=>[...g[8]||(g[8]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(A,{modelValue:a.value,"onUpdate:modelValue":g[2]||(g[2]=S=>a.value=S),disabled:u.value,id:"approve-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",qt,[e.createVNode(k,{for:"approve-dialog-body"},{default:e.withCtx(()=>[...g[9]||(g[9]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode(w,{modelValue:s.value,"onUpdate:modelValue":g[3]||(g[3]=S=>s.value=S),disabled:u.value,id:"approve-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode(b,null,{default:e.withCtx(()=>[e.createVNode($,{variant:"outline",onClick:g[4]||(g[4]=S=>c.value=!1)},{default:e.withCtx(()=>[...g[10]||(g[10]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode($,{onClick:m},{default:e.withCtx(()=>[...g[11]||(g[11]=[e.createTextVNode("Approve reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),to={class:"flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md"},oo={class:"grid gap-2"},no={class:"grid gap-2"},so={class:"grid gap-2"},ro=e.defineComponent({__name:"RejectReservationDialog",emits:["confirm"],setup(n,{expose:t,emit:o}){const{config:r}=R.useModule(),{sendMail:i}=R.useMailer(r.mailAccount),l=o,c=e.ref(!1),d=e.ref(!1),u=e.ref(""),f=e.ref(""),a=e.ref(""),s=m=>{d.value=!r.mailAccount,c.value=!0,m&&(u.value=m.customerInfo?.email,f.value="Regarding your reservation request for "+new Date(m.date)?.toDateString(),a.value=`Dear ${m.customerInfo?.firstName??""} ${m.customerInfo?.lastName??""},
346
+
347
+ Thank you for your interest in booking with us. Unfortunately, we are unable to confirm your request for ${new Date(m.date)?.toDateString()} at ${m.startTime}.
348
+
349
+ We would love to see you another time!`)},h=()=>{if(!d.value){if(!u.value||!f.value||!a.value)return alert("Please fill in all the fields.");i({to:u.value,subject:f.value,body:a.value})}c.value=!1;const{$confetti:m}=useNuxtApp();m(),l("confirm")};return t({openDialog:s}),(m,p)=>{const g=e.resolveComponent("DialogTitle"),y=e.resolveComponent("DialogDescription"),D=e.resolveComponent("DialogHeader"),E=e.resolveComponent("Checkbox"),N=e.resolveComponent("Label"),k=e.resolveComponent("Input"),A=e.resolveComponent("Textarea"),w=e.resolveComponent("Button"),$=e.resolveComponent("DialogFooter"),b=e.resolveComponent("DialogScrollContent"),B=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(B,{open:c.value,"onUpdate:open":p[5]||(p[5]=x=>c.value=x)},{default:e.withCtx(()=>[e.createVNode(b,{class:"sm:max-w-3xl"},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[...p[6]||(p[6]=[e.createTextVNode(" Reject Reservation Request ",-1)])]),_:1}),e.createVNode(y)]),_:1}),e.createElementVNode("div",to,[e.createVNode(E,{modelValue:d.value,"onUpdate:modelValue":p[0]||(p[0]=x=>d.value=x),id:"reject-dialog-skip-mail",class:"border-black/80 dark:border-gray-200",disabled:!e.unref(r).mailAccount},null,8,["modelValue","disabled"]),e.createVNode(N,{for:"reject-dialog-skip-mail",class:"py-4 pl-2 pr-4"},{default:e.withCtx(()=>[...p[7]||(p[7]=[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",oo,[e.createVNode(N,{for:"reject-dialog-email"},{default:e.withCtx(()=>[...p[8]||(p[8]=[e.createTextVNode("To:",-1)])]),_:1}),e.createVNode(k,{modelValue:u.value,"onUpdate:modelValue":p[1]||(p[1]=x=>u.value=x),disabled:d.value,id:"reject-dialog-email"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",no,[e.createVNode(N,{for:"reject-dialog-subject"},{default:e.withCtx(()=>[...p[9]||(p[9]=[e.createTextVNode("Subject:",-1)])]),_:1}),e.createVNode(k,{modelValue:f.value,"onUpdate:modelValue":p[2]||(p[2]=x=>f.value=x),disabled:d.value,id:"reject-dialog-subject"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",so,[e.createVNode(N,{for:"reject-dialog-body"},{default:e.withCtx(()=>[...p[10]||(p[10]=[e.createTextVNode("Body:",-1)])]),_:1}),e.createVNode(A,{modelValue:a.value,"onUpdate:modelValue":p[3]||(p[3]=x=>a.value=x),disabled:d.value,id:"reject-dialog-body"},null,8,["modelValue","disabled"])])],2),e.createVNode($,null,{default:e.withCtx(()=>[e.createVNode(w,{variant:"outline",onClick:p[4]||(p[4]=x=>c.value=!1)},{default:e.withCtx(()=>[...p[11]||(p[11]=[e.createTextVNode("Close",-1)])]),_:1}),e.createVNode(w,{variant:"destructive",onClick:h},{default:e.withCtx(()=>[...p[12]||(p[12]=[e.createTextVNode("Reject reservation",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),ao={key:0},io={key:0,class:"flex items-center gap-1.5 flex-wrap"},lo={key:0,class:"space-y-2 mb-4"},co={class:"text-xs font-medium text-muted-foreground uppercase tracking-wide"},uo={key:0,class:"text-2xl font-bold tracking-wider"},mo={key:1,class:"flex flex-wrap gap-2 mb-4"},po={key:1,class:"text-xs text-muted-foreground mr-0.5"},fo={key:2,class:"space-y-3"},ho={class:"bg-muted/30 rounded-lg p-4 space-y-2"},vo={class:"text-muted-foreground flex items-center gap-1.5"},go={class:"font-medium"},he=e.defineComponent({__name:"OrderMetadataDisplay",props:{metadata:{default:()=>({})},schema:{default:()=>[]},displayFilter:{default:void 0},scope:{default:void 0},compact:{type:Boolean,default:!1}},setup(n,{expose:t}){const o=n,r=e.computed(()=>{if(!o.metadata)return[];const u=new Set(o.schema?.map(s=>s.key)||[]),f=(o.schema||[]).filter(s=>!(o.scope&&s.scope!==o.scope||o.displayFilter&&!o.displayFilter.includes(s.display)||o.metadata[s.key]===void 0||o.metadata[s.key]===null||s.display==="hidden"||o.metadata[s.key]===!1)).sort((s,h)=>(s.order||0)-(h.order||0)).map(s=>({...s,value:o.metadata[s.key]}));if(o.displayFilter&&!o.displayFilter.includes("field"))return f;const a=Object.entries(o.metadata).filter(([s,h])=>!u.has(s)&&h!==void 0&&h!==null&&h!==!1).map(([s,h])=>({id:`_fallback_${s}`,key:s,label:s.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/^\w/,m=>m.toUpperCase()).trim(),display:"field",scope:"order",value:typeof h=="object"?JSON.stringify(h):String(h)}));return[...f,...a]}),i=e.computed(()=>r.value.filter(u=>u.display==="highlight")),l=e.computed(()=>r.value.filter(u=>u.display==="badge")),c=e.computed(()=>r.value.filter(u=>u.display==="field")),d=e.computed(()=>r.value.length>0);return t({hasContent:d}),(u,f)=>d.value?(e.openBlock(),e.createElementBlock("div",ao,[n.compact?(e.openBlock(),e.createElementBlock("div",io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,a=>(e.openBlock(),e.createElementBlock("span",{key:a.id,class:e.normalizeClass(["inline-flex items-center gap-1 px-2 py-0.5 text-xs font-bold rounded-md",a.color?"":"bg-primary/10 text-primary"]),style:e.normalizeStyle(a.color?{backgroundColor:a.color+"20",color:a.color}:{})},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(V.icons)[a.icon]),{size:12})),e.createTextVNode(" "+e.toDisplayString(a.value===!0?a.label:a.value),1)],6))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,a=>(e.openBlock(),e.createElementBlock("span",{key:a.id,class:e.normalizeClass(["inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full",a.color?"":"bg-muted text-muted-foreground"]),style:e.normalizeStyle(a.color?{backgroundColor:a.color+"20",color:a.color}:{})},[a.icon&&e.unref(V.icons)[a.icon]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(V.icons)[a.icon]),{key:0,size:10})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.value===!0?a.label:a.value),1)],6))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.value.length?(e.openBlock(),e.createElementBlock("div",lo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["rounded-lg border-2 p-4 flex items-center gap-4",a.color?"":"border-primary/20 bg-primary/5"]),style:e.normalizeStyle(a.color?{borderColor:a.color+"40",backgroundColor:a.color+"08"}:{})},[e.createElementVNode("div",{class:e.normalizeClass(["h-12 w-12 rounded-xl flex items-center justify-center shrink-0",a.color?"":"bg-primary/10"]),style:e.normalizeStyle(a.color?{backgroundColor:a.color+"20"}:{})},[a.icon&&e.unref(V.icons)[a.icon]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(V.icons)[a.icon]),{key:0,size:24,style:e.normalizeStyle(a.color?{color:a.color}:{}),class:e.normalizeClass(a.color?"":"text-primary")},null,8,["style","class"])):e.createCommentVNode("",!0)],6),e.createElementVNode("div",null,[e.createElementVNode("p",co,e.toDisplayString(a.label),1),a.value!==!0?(e.openBlock(),e.createElementBlock("p",uo,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)])],6))),128))])):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,a=>(e.openBlock(),e.createElementBlock("span",{key:a.id,class:e.normalizeClass(["inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-full",a.color?"":"bg-muted text-muted-foreground"]),style:e.normalizeStyle(a.color?{backgroundColor:a.color+"20",color:a.color}:{})},[a.icon&&e.unref(V.icons)[a.icon]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(V.icons)[a.icon]),{key:0,size:14})):e.createCommentVNode("",!0),a.label?(e.openBlock(),e.createElementBlock("span",po,[e.createTextVNode(e.toDisplayString(a.label),1),a.value!==!0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(":")],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),a.value!==!0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(a.value),1)],64)):e.createCommentVNode("",!0)],6))),128))])):e.createCommentVNode("",!0),c.value.length?(e.openBlock(),e.createElementBlock("div",fo,[f[0]||(f[0]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Additional Info",-1)),e.createElementVNode("div",ho,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:"flex justify-between text-sm"},[e.createElementVNode("span",vo,[a.icon&&e.unref(V.icons)[a.icon]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(V.icons)[a.icon]),{key:0,size:14})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.label),1)]),e.createElementVNode("span",go,e.toDisplayString(a.value===!0?"✓":a.value),1)]))),128))])])):e.createCommentVNode("",!0)],64))])):e.createCommentVNode("",!0)}}),xo={key:0,class:"space-y-6 py-4"},Co={class:"space-y-3"},yo={class:"bg-muted/30 rounded-lg p-4 space-y-3"},_o={class:"flex items-center gap-3"},No={class:"h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center"},Vo={class:"font-medium"},ko={class:"grid gap-2 text-sm"},bo={key:0,class:"flex items-center gap-2 text-muted-foreground"},Do=["href"],wo={key:1,class:"flex items-center gap-2 text-muted-foreground"},Eo=["href"],Bo={class:"space-y-3"},Ao={class:"grid grid-cols-2 gap-3"},So={class:"bg-muted/30 rounded-lg p-3"},Mo={class:"flex items-center gap-2 text-muted-foreground mb-1"},Io={class:"text-xs"},$o={class:"font-medium"},Fo={class:"bg-muted/30 rounded-lg p-3"},To={class:"flex items-center gap-2 text-muted-foreground mb-1"},Ro={class:"font-medium"},jo={key:0,class:"space-y-3"},Oo={class:"bg-muted/30 rounded-lg p-4"},zo={class:"flex items-start justify-between"},Lo={class:"flex items-start gap-3"},Po={class:"h-9 w-9 rounded-lg bg-primary/10 flex items-center justify-center mt-0.5"},Uo={class:"font-medium"},Ho={class:"text-sm text-muted-foreground"},Wo={class:"font-semibold"},Ko={class:"space-y-3"},Go={class:"bg-muted/30 rounded-lg p-4 space-y-3"},Yo={class:"space-y-2 text-sm"},Qo={class:"flex justify-between"},Xo={key:0,class:"flex justify-between"},Jo={key:1,class:"grid"},Zo={class:"text-muted-foreground"},qo={key:0},en={key:1},tn={class:"flex justify-between font-semibold"},on={class:"flex justify-between font-semibold"},nn={class:"flex items-center gap-2"},sn={key:1,class:"space-y-2 text-sm"},rn={key:0,class:"flex justify-between"},an={class:"text-muted-foreground flex items-center gap-1.5"},ln={class:"text-green-600 dark:text-green-400"},cn={key:1,class:"flex justify-between"},un={class:"text-muted-foreground flex items-center gap-1.5"},dn={class:"text-orange-600 dark:text-orange-400 font-medium"},mn=e.defineComponent({__name:"ReservationDetailDialog",props:{agendaData:{},showOrderLink:{type:Boolean,default:!1}},emits:["cancelled","confirmed","rejected","openOrder"],setup(n,{expose:t,emit:o}){const r=n,{hasPermission:i}=R.useModulePermissions(),{config:l}=R.useModule(),c=R.useFirebaseIntegration(l.project),d=e.inject("event",e.ref(null)),u=e.computed(()=>r.agendaData?.metadataSchema||[]),f=o,a=e.ref(!1),s=e.ref(null),h=e.ref(!1),m=e.computed(()=>s.value?.id||s.value?.orderId||""),p=e.useTemplateRef("cancelReservationDialog"),g=e.useTemplateRef("approveReservationDialog"),y=e.useTemplateRef("rejectReservationDialog"),D=e.useTemplateRef("transferReservationDialog"),E=_=>{const v=_?.id||_?.orderId;!_||!v||(s.value={..._,id:v},a.value=!0)},N=e.computed(()=>s.value?.customerInfo&&`${s.value.customerInfo.firstName} ${s.value.customerInfo.lastName}`.trim()||"Unknown Customer"),k=e.computed(()=>{let _=s.value?.status;const v=s.value?.reservationStatus;switch(_==="confirmed"&&["needs_approval","rejected","approved","cancelled"].includes(v)&&(_=v),_){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"};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"confirmed":return{label:"Confirmed",class:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"};default:return{label:_||"Unknown",class:"bg-muted text-muted-foreground"}}}),A=e.computed(()=>s.value?.status==="cancelled"),w=_=>_==null||typeof _!="number"?"—":`€${_?.toFixed(2)}`,$=_=>{if(!_)return"—";if(_<60)return`${_} min`;const v=Math.floor(_/60),M=_%60;return M>0?`${v}h ${M}min`:`${v}h`},b=()=>{if(!s.value)return;let _="";const v=d?.value?.date;if(v)try{_=new Date(v).toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}catch{_=v}const M={date:_,resourceName:d?.value?.resource?.name};Tt(s.value,M)},B=()=>{g.value?.openDialog(s.value)},x=()=>{y.value?.openDialog(s.value)},S=()=>{g.value?.openDialog(s.value)},G=()=>{p.value?.openDialog(s.value)},j=async()=>{try{if(h.value||!s.value?.id)throw new Error("Invalid state");h.value=!0;let v=(await c.get(l.reservationsCollection,s.value.id))?.reservations||[];if(!v.find(M=>M.id===s.value.res_id))throw new Error("Reservation not found");v.find(M=>M.id===s.value.res_id).status="cancelled",await c.update(l.reservationsCollection,s.value.id,{reservations:v}),s.value.status="cancelled",K.toast.success("Reservation cancelled successfully"),f("cancelled"),a.value=!1}catch(_){console.error("Error cancelling reservation:",_),K.toast.error("Failed to cancel reservation")}finally{h.value=!1}},ye=async()=>{try{if(h.value||!s.value?.id)throw new Error("Invalid state");h.value=!0;let v=(await c.get(l.reservationsCollection,s.value.id))?.reservations||[];if(!v.find(M=>M.id===s.value.res_id))throw new Error("Reservation not found");v.find(M=>M.id===s.value.res_id).status="approved",await c.update(l.reservationsCollection,s.value.id,{reservations:v}),s.value.status="approved",K.toast.success("Reservation approved successfully"),f("confirmed"),a.value=!1}catch(_){console.error("Error approving reservation:",_),K.toast.error("Failed to approve reservation")}finally{h.value=!1}},T=async()=>{try{if(h.value||!s.value?.id)throw new Error("Invalid state");h.value=!0;let v=(await c.get(l.reservationsCollection,s.value.id))?.reservations||[];if(!v.find(M=>M.id===s.value.res_id))throw new Error("Reservation not found");v.find(M=>M.id===s.value.res_id).status="rejected",await c.update(l.reservationsCollection,s.value.id,{reservations:v}),s.value.status="rejected",K.toast.success("Reservation rejected successfully"),f("rejected"),a.value=!1}catch(_){console.error("Error rejecting reservation:",_),K.toast.error("Failed to reject reservation")}finally{h.value=!1}},W=()=>{},X=()=>{D.value?.openDialog(s.value)},Te=()=>{m.value&&(a.value=!1,f("openOrder",m.value))};return t({openDialog:E}),(_,v)=>{const M=e.resolveComponent("ResponsiveModalTitle"),ne=e.resolveComponent("ResponsiveModalDescription"),Re=e.resolveComponent("ResponsiveModalHeader"),se=e.resolveComponent("Separator"),re=e.resolveComponent("Button"),je=e.resolveComponent("DropdownMenuTrigger"),J=e.resolveComponent("DropdownMenuLabel"),Y=e.resolveComponent("DropdownMenuItem"),Z=e.resolveComponent("DropdownMenuGroup"),ae=e.resolveComponent("DropdownMenuSeparator"),Oe=e.resolveComponent("DropdownMenuContent"),ze=e.resolveComponent("DropdownMenu"),Le=e.resolveComponent("ResponsiveModalFooter"),Pe=e.resolveComponent("ResponsiveModalScrollContent"),Ue=e.resolveComponent("ResponsiveModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ue,{open:a.value,"onUpdate:open":v[0]||(v[0]=O=>a.value=O)},{default:e.withCtx(()=>[e.createVNode(Pe,{class:"sm:max-w-xl"},{default:e.withCtx(()=>[e.createVNode(Re,null,{default:e.withCtx(()=>[e.createVNode(M,{class:"flex items-center gap-3"},{default:e.withCtx(()=>[v[1]||(v[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",k.value.class])},e.toDisplayString(k.value.label),3)]),_:1}),e.createVNode(ne,null,{default:e.withCtx(()=>[e.createTextVNode(" Booking #"+e.toDisplayString(m.value.slice(0,8)||"—"),1)]),_:1})]),_:1}),s.value?(e.openBlock(),e.createElementBlock("div",xo,[e.createVNode(he,{metadata:s.value.metadata,schema:u.value,scope:"order"},null,8,["metadata","schema"]),e.createVNode(he,{metadata:s.value.reservationMetadata,schema:u.value,scope:"reservation"},null,8,["metadata","schema"]),e.createElementVNode("div",Co,[v[2]||(v[2]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Customer",-1)),e.createElementVNode("div",yo,[e.createElementVNode("div",_o,[e.createElementVNode("div",No,[e.createVNode(e.unref(V.User),{size:20,class:"text-primary"})]),e.createElementVNode("div",null,[e.createElementVNode("p",Vo,e.toDisplayString(N.value),1)])]),e.createElementVNode("div",ko,[s.value.customerInfo?.email?(e.openBlock(),e.createElementBlock("div",bo,[e.createVNode(e.unref(V.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,Do)])):e.createCommentVNode("",!0),s.value.customerInfo?.phone?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode(e.unref(V.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,Eo)])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",Bo,[v[4]||(v[4]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Reservation",-1)),e.createElementVNode("div",Ao,[e.createElementVNode("div",So,[e.createElementVNode("div",Mo,[e.createVNode(e.unref(V.Clock),{size:14}),e.createElementVNode("span",Io,e.toDisplayString(s.value.startTime)+" - "+e.toDisplayString(s.value.endTime),1)]),e.createElementVNode("p",$o,e.toDisplayString(new Date(s.value.date).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})),1)]),e.createElementVNode("div",Fo,[e.createElementVNode("div",To,[e.createVNode(e.unref(V.Users),{size:14}),v[3]||(v[3]=e.createElementVNode("span",{class:"text-xs"},"Spots",-1))]),e.createElementVNode("p",Ro,e.toDisplayString(s.value.spots||1)+" "+e.toDisplayString(s.value.spots===1?"person":"people"),1)])])]),s.value.pricingOption?(e.openBlock(),e.createElementBlock("div",jo,[v[5]||(v[5]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Package",-1)),e.createElementVNode("div",Oo,[e.createElementVNode("div",zo,[e.createElementVNode("div",Lo,[e.createElementVNode("div",Po,[e.createVNode(e.unref(V.Tag),{size:18,class:"text-primary"})]),e.createElementVNode("div",null,[e.createElementVNode("p",Uo,e.toDisplayString(s.value.pricingOption.name),1),e.createElementVNode("p",Ho,e.toDisplayString($(s.value.pricingOption.duration)),1)])]),e.createElementVNode("p",Wo,e.toDisplayString(w(s.value.pricingOption.price)),1)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",Ko,[v[12]||(v[12]=e.createElementVNode("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wide"},"Payment",-1)),e.createElementVNode("div",Go,[e.createElementVNode("div",Yo,[e.createElementVNode("div",Qo,[v[6]||(v[6]=e.createElementVNode("span",{class:"text-muted-foreground"},"Base price",-1)),e.createElementVNode("span",null,e.toDisplayString(w(s.value.reservationBasePrice)),1)]),s.value.reservationAddOnsPrice?(e.openBlock(),e.createElementBlock("div",Xo,[v[7]||(v[7]=e.createElementVNode("span",{class:"text-muted-foreground"},"Add-ons",-1)),e.createElementVNode("span",null,e.toDisplayString(w(s.value.reservationAddOnsPrice)),1)])):e.createCommentVNode("",!0),s.value.reservationAdjustments&&s.value.reservationAdjustments.length?(e.openBlock(),e.createElementBlock("div",Jo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value.reservationAdjustments,O=>(e.openBlock(),e.createElementBlock("div",{key:O,class:"flex justify-between"},[e.createElementVNode("span",Zo,e.toDisplayString(O.label),1),O.type=="percent"?(e.openBlock(),e.createElementBlock("span",qo,e.toDisplayString(O.value)+"% ",1)):(e.openBlock(),e.createElementBlock("span",en,e.toDisplayString(O.value<0?"-":"+")+e.toDisplayString(w(Math.abs(O.value))),1))]))),128))])):e.createCommentVNode("",!0)]),e.createVNode(se),e.createElementVNode("div",tn,[v[8]||(v[8]=e.createElementVNode("span",null,"Reservation Total",-1)),e.createElementVNode("span",null,e.toDisplayString(w(s.value.reservationPrice)),1)]),e.createVNode(se),e.createElementVNode("div",on,[e.createElementVNode("div",nn,[v[9]||(v[9]=e.createElementVNode("span",null,"Order Total",-1)),n.showOrderLink?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"text-[10px] uppercase bg-muted hover:bg-muted/50 px-2 py-1 rounded cursor-pointer",onClick:Te}," view order ")):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(w(s.value.total)),1)]),s.value.amountPaid!==void 0||s.value.amountDue!==void 0?(e.openBlock(),e.createBlock(se,{key:0})):e.createCommentVNode("",!0),s.value.amountPaid!==void 0||s.value.amountDue!==void 0?(e.openBlock(),e.createElementBlock("div",sn,[s.value.amountPaid!==void 0?(e.openBlock(),e.createElementBlock("div",rn,[e.createElementVNode("span",an,[e.createVNode(e.unref(V.CreditCard),{size:14}),v[10]||(v[10]=e.createTextVNode(" Amount paid ",-1))]),e.createElementVNode("span",ln,e.toDisplayString(w(s.value.amountPaid)),1)])):e.createCommentVNode("",!0),s.value.amountDue!==void 0&&s.value.amountDue>0?(e.openBlock(),e.createElementBlock("div",cn,[e.createElementVNode("span",un,[e.createVNode(e.unref(V.Receipt),{size:14}),v[11]||(v[11]=e.createTextVNode(" Amount due ",-1))]),e.createElementVNode("span",dn,e.toDisplayString(w(s.value.amountDue)),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createVNode(Le,{class:"gap-2 sm:justify-between"},{default:e.withCtx(()=>[s.value?.status==="confirmed"&&s.value?.reservationStatus==="needs_approval"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(re,{variant:"destructive",onClick:x},{default:e.withCtx(()=>[e.createVNode(e.unref(V.Ban),{size:16}),v[13]||(v[13]=e.createTextVNode(" Reject Reservation ",-1))]),_:1}),e.createVNode(re,{onClick:B},{default:e.withCtx(()=>[e.createVNode(e.unref(V.ClockCheck),{size:16}),v[14]||(v[14]=e.createTextVNode(" Approve Reservation ",-1))]),_:1})],64)):s.value?.status==="confirmed"&&s.value?.reservationStatus==="approved"?(e.openBlock(),e.createBlock(ze,{key:1},{default:e.withCtx(()=>[e.createVNode(je,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(re,{variant:"outline",class:"gap-2"},{default:e.withCtx(()=>[e.createVNode(e.unref(V.MoreHorizontal),{size:16}),v[15]||(v[15]=e.createTextVNode(" Actions ",-1))]),_:1})]),_:1}),e.createVNode(Oe,{class:"w-60",align:"start"},{default:e.withCtx(()=>[e.createVNode(J,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...v[16]||(v[16]=[e.createTextVNode(" Reservation Actions ",-1)])]),_:1}),e.createVNode(Z,null,{default:e.withCtx(()=>[e.createVNode(Y,{onClick:b,class:"gap-2 cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(V.Download),{size:16,class:"text-muted-foreground"}),v[17]||(v[17]=e.createElementVNode("span",null,"Download PDF",-1))]),_:1})]),_:1}),e.createVNode(ae),e.createVNode(Z,null,{default:e.withCtx(()=>[e.createVNode(J,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...v[18]||(v[18]=[e.createTextVNode(" Communication ",-1)])]),_:1}),e.createVNode(Y,{onClick:S,class:"gap-2 cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(V.MailCheck),{size:16,class:"text-muted-foreground"}),v[19]||(v[19]=e.createElementVNode("span",null,"(Re)send Confirmation Mail",-1))]),_:1})]),_:1}),e.unref(i)("manage-reservations")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(ae),e.createVNode(Z,null,{default:e.withCtx(()=>[e.createVNode(J,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...v[20]||(v[20]=[e.createTextVNode(" Modify Reservation ",-1)])]),_:1}),e.createVNode(Y,{onClick:X,class:"gap-2 cursor-pointer",disabled:A.value},{default:e.withCtx(()=>[e.createVNode(e.unref(V.CalendarClock),{size:16,class:"text-muted-foreground"}),v[21]||(v[21]=e.createElementVNode("span",null,"Transfer Date & Time",-1))]),_:1},8,["disabled"])]),_:1}),e.createVNode(ae),e.createVNode(Z,null,{default:e.withCtx(()=>[e.createVNode(J,{class:"text-xs text-muted-foreground font-normal"},{default:e.withCtx(()=>[...v[22]||(v[22]=[e.createTextVNode(" Cancellation ",-1)])]),_:1}),e.createVNode(Y,{onClick:G,class:"gap-2 cursor-pointer",variant:"destructive",disabled:A.value},{default:e.withCtx(()=>[e.createVNode(e.unref(V.XCircle),{size:16}),v[23]||(v[23]=e.createElementVNode("span",null,"Cancel Reservation",-1))]),_:1},8,["disabled"]),s.value?.total&&s.value.total>0?(e.openBlock(),e.createBlock(Y,{key:0,onClick:W,class:"gap-2 cursor-pointer text-orange-600 dark:text-orange-400 focus:text-orange-600 dark:focus:text-orange-400",disabled:A.value},{default:e.withCtx(()=>[e.createVNode(e.unref(V.Gift),{class:"text-inherit",size:16}),v[24]||(v[24]=e.createElementVNode("span",null,"Cancel & Refund",-1))]),_:1},8,["disabled"])):e.createCommentVNode("",!0)]),_:1})],64)):e.createCommentVNode("",!0)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1},8,["open"]),e.createVNode(Lt,{ref_key:"cancelReservationDialog",ref:p,onConfirm:j},null,512),e.createVNode(eo,{ref_key:"approveReservationDialog",ref:g,onConfirm:ye},null,512),e.createVNode(ro,{ref_key:"rejectReservationDialog",ref:y,onConfirm:T},null,512),e.createVNode(Qt,{ref_key:"transferReservationDialog",ref:D},null,512)],64)}}});exports.Fuse=P;exports._sfc_main=he;exports._sfc_main$1=mn;