import{cG as L,cH as P,A as p,L as w,v as R,x as v,N as l,cI as _,cy as m,cJ as c}from"./stepForm-ea4a5b69.js";import{e as z,b,a as h,c as T,u as I,M as U,m as M}from"./eventBooking-a8b0bf62.js";import"./customerPanel-3705d852.js";import"./eventListForm-2ddac9f8.js";import"./catalogForm-d2bd8906.js";const k=L({modules:{entities:z,booking:b,eventEntities:h,eventBooking:T}});window.stylesInjectedV3=async function(){};const B=_({loader:()=>c(()=>import(""+(window.__dynamic_handler__||function(e){return e})("./CustomizeCatalog-8b389b5d.js")+""),[],import.meta.url)}),V=_({loader:()=>c(()=>import(""+(window.__dynamic_handler__||function(e){return e})("./CustomizeCustomerPanel-82bf840d.js")+""),[],import.meta.url)}),H=_({loader:()=>c(()=>import(""+(window.__dynamic_handler__||function(e){return e})("./CustomizeEmployeePanel-f019b1e1.js")+""),[],import.meta.url)}),S=_({loader:()=>c(()=>import(""+(window.__dynamic_handler__||function(e){return e})("./CustomizeEventCalendar-c395c307.js")+""),[],import.meta.url)}),N=_({loader:()=>c(()=>import(""+(window.__dynamic_handler__||function(e){return e})("./CustomizeEventList-ab177499.js")+""),[],import.meta.url)}),C=_({loader:()=>c(()=>import(""+(window.__dynamic_handler__||function(e){return e})("./CustomizeStepNew-2eabb7d6.js")+""),[],import.meta.url)}),y=window.wpAmeliaUrls.wpAmeliaPluginURL+"v3/public/";window.__dynamic_handler__=function(e){return y+"assets/"+e};window.__dynamic_preload__=function(e){return e.map(s=>y+s)};function K(){const e=Array.isArray(window.localeLanguage)?window.localeLanguage[0]:"";return typeof e!="string"||!e?"en":e.toLowerCase().replace("_","-").split("-")[0]||"en"}function j(){let e=[];{const s=Array.from(document.getElementsByTagName("link")).filter(o=>o.getAttribute("rel")==="stylesheet"&&o.getAttribute("href")?.includes("ameliabooking/v3/public/assets")),i=Array.from(document.getElementsByTagName("style")).filter(o=>o.textContent?.includes("/* purgecss start ignore */"));e=[...s,...i]}return e}async function D(e){if(!e)return;const i=await(()=>new Promise(n=>{const t=()=>{const a=j();return a!==void 0&&a.length>0&&window.customizeComponentLoaded?a:null},r=t();if(r){n(r);return}const u=new MutationObserver(()=>{const a=t();a&&(u.disconnect(),n(a))});u.observe(document.head,{childList:!0,subtree:!0});const d=()=>{const a=t();a?(u.disconnect(),n(a)):window.customizeComponentLoaded||requestAnimationFrame(d)};requestAnimationFrame(d)}))(),o=document.createDocumentFragment();i.forEach((n,t)=>{const r=n.cloneNode(!0);r.id=`v3-style-${t}`,n.tagName==="LINK"&&n.href&&(r.href=n.href),o.appendChild(r)}),e.appendChild(o),window.stylesInjectedV3()}function E(){const s=document.getElementsByClassName("amd-cp__preview")[0]?.shadowRoot,i=s?.getElementById("amelia-app-backend-new");if(!i){setTimeout(E,100);return}const o=window.v3?.componentToMount!==void 0?window.v3.componentToMount:"Customize";let n,t;switch(o){case"CustomizeCatalog":n=B,t="CustomizeCatalog";break;case"CustomizeCustomerPanel":n=V,t="CustomizeCustomerPanel";break;case"CustomizeEmployeePanel":n=H,t="CustomizeEmployeePanel";break;case"CustomizeEventCalendar":n=S,t="CustomizeEventCalendar";break;case"CustomizeEventList":n=N,t="CustomizeEventList";break;case"CustomizeStepNew":n=C,t="CustomizeStepNew";break;default:n=C,t="CustomizeStepNew"}P({setup(){const r=p(window.wpAmeliaUrls),u=w(window.wpAmeliaLanguages),d=w(window.wpAmeliaSettings),a=p("wpAmeliaTimeZone"in window?window.wpAmeliaTimeZone[0]:""),A=p(window.localeLanguage[0]),f=w(window.wpAmeliaLabels),g=w(I());l("settings",m(d)),l("baseUrls",m(r)),l("timeZone",m(a)),l("localLanguage",m(A)),l("languages",m(u)),l("labels",m(f)),l("licence",g),R(async()=>{await D(s)})},template:`<${t} />`}).component(t,n).use(U,{theme:{preset:M,strategy:"runtime",darkModeStrategy:"class"},translations:{locale:K(),fallbackLocale:"en"}}).use(k).mount(i)}window.onUnmountedV3Callback||(window.onUnmountedV3Callback=async()=>{});async function O(){const s=document.getElementsByClassName("amd-cp__preview")[0]?.shadowRoot,i=s?.getElementById("amelia-app-backend-new"),o=i?.__vue_app__;if(s?.querySelectorAll('[id^="v3-style-"]')?.forEach(t=>{t.remove()}),o){o.unmount(),await v();const t=!i?.innerHTML||i.innerHTML.trim()==="";typeof window.onUnmountedV3Callback=="function"&&t&&await window.onUnmountedV3Callback()}}window.mountUnmountV3App=async()=>{window.v3?E():await O()};
