1import{_ as x}from"./UiSection-C08CRQv1.js";import{_ as C,d as m,e,w as a,F as d,o as r,b as t,i as w,l as D,c as _,s as M,n as f}from"./app-ziVVN7Ui.js";import{_ as G}from"./UiInput-TqYDLgrn.js";import{_ as L}from"./UiSectionHeader-DQSBWGvm.js";import{_ as I}from"./UiHeader-DjeFbFcA.js";import{a as X}from"./NotificationsDialog-B-HySxra.js";import{_ as A}from"./UiTabs-C3i0ymqQ.js";import"./PhoneCountryInput-DwytQcYu.js";import"./UiSeparatorGroup-iBxe6IAG.js";import"./useStripeAppearance-Cu4stl4q.js";import"./useStripePayment-qrcf4evR.js";import"./color-thief-CsnTZYaX.js";import"./UiRadio-xvaEvAUk.js";import"./UiLoadingArea-ChMFTNhz.js";import"./UiStep-DHVKADiV.js";import"./UiGiftCard-Byfuvn2u.js";const E={props:{auth:{type:Object,default:()=>({})}},data(){return{tabs:[{title:"Profile",href:"/settings/business"},{title:"Payments",href:"/settings/payments"},{title:"Policies",href:"/settings/policies"},{title:"Availability",href:"/settings/availability"},{title:"Plan & Billing",href:"/settings/billing"},{title:"Team",href:"/settings/team"},{title:"Integrations",href:"/settings/integrations"}],mailerLiteDialog:!1,apiKey:"",mailerliteConnected:!1,errors:{},saving:!1,gtmDialog:!1,gtmContainerId:"",gtmConnected:!1,gtmErrors:{},gtmSaving:!1}},mounted(){this.loadIntegrations()},methods:{loadIntegrations(){axios.get("/api/business/integrations").then(o=>{this.mailerliteConnected=o.data.mailerlite_connected,this.gtmConnected=!!o.data.google_tracking_id,this.gtmContainerId=o.data.google_tracking_id||""})},openMailerLiteDialog(){this.mailerLiteDialog=!0,this.apiKey="",this.errors={}},closeMailerLiteDialog(){this.mailerLiteDialog=!1,this.apiKey="",this.errors={}},saveApiKey(){this.saving=!0,this.errors={},axios.post("/api/business/integrations/mailerlite",{api_key:this.apiKey}).then(()=>{this.mailerliteConnected=!0,this.closeMailerLiteDialog(),window.toast({title:"Connected",description:"MailerLite has been connected successfully."})}).catch(o=>{this.errors=o.response?.data?.errors||{}}).finally(()=>{this.saving=!1})},disconnectMailerLite(){confirm("Are you sure you want to disconnect MailerLite?")&&axios.delete("/api/business/integrations/mailerlite").then(()=>{this.mailerliteConnected=!1,window.toast({title:"Disconnected",description:"MailerLite has been disconnected."})})},openGtmDialog(){this.gtmDialog=!0,this.gtmErrors={}},closeGtmDialog(){this.gtmDialog=!1,this.gtmErrors={}},saveGtm(){this.gtmSaving=!0,this.gtmErrors={},axios.post("/api/business/integrations/gtm",{google_tracking_id:this.gtmContainerId||null}).then(o=>{this.gtmConnected=!!o.data.google_tracking_id,this.gtmContainerId=o.data.google_tracking_id||"",this.closeGtmDialog(),window.toast({title:"Saved",description:"Tracking has been connected successfully."})}).catch(o=>{this.gtmErrors=o.response?.data?.errors||{}}).finally(()=>{this.gtmSaving=!1})},disconnectGtm(){confirm("Are you sure you want to disconnect Google Tag Manager?")&&axios.post("/api/business/integrations/gtm",{google_tracking_id:null}).then(()=>{this.gtmConnected=!1,this.gtmContainerId="",window.toast({title:"Disconnected",description:"Tracking has been disconnected."})})}}},S={class:"divide-y divide-neutral-900/5 border-b border-neutral-900/10"},T={class:"flex flex-col sm:flex-row sm:items-center py-10 gap-6"},V={class:"flex-1 flex items-center gap-4"},K={class:"w-full *:w-full sm:w-auto flex md:justify-end gap-2"},U={class:"flex flex-col sm:flex-row sm:items-center py-10 gap-6"},j={class:"flex-1 flex items-center gap-4"},P={class:"w-full *:w-full sm:w-auto flex md:justify-end gap-2"},z={class:"flex flex-col sm:flex-row sm:items-center py-10 gap-6"},B={class:"flex-1 flex items-center gap-4"},q={class:"w-full *:w-full sm:w-auto flex md:justify-end gap-2"},N={class:"flex flex-col gap-4 -mt-4 -mb-2"},F={class:"flex flex-col gap-4 -mt-4 -mb-2"};function O(o,i,H,J,n,s){const h=A,y=X,k=I,b=L,c=w,l=D,u=G,p=M,v=x;return r(),m(d,null,[e(k,{title:"Settings"},{tabs:a(()=>[e(h,{tabs:n.tabs},null,8,["tabs"])]),actions:a(()=>[e(y)]),_:1}),e(v,{class:"!pt-0 !gap-0"},{default:a(()=>[e(b,{title:"Integrations",subtitle:"Connect third-party services to enhance your business."}),t("div",S,[t("div",T,[t("div",V,[i[2]||(i[2]=t("div",{class:"size-12 aspect-square rounded-[10px] outline-black/5 outline outline-[1px] outline-offset-[-1px] overflow-hidden shrink-0 flex items-center justify-center"},[t("img",{src:"/branding/time2bookme-symbol.svg",class:"size-6"})],-1)),e(c,{title:"Time2book",subtitle:"Embed schedule, appointments and pricing to your website."})]),t("div",K,[e(l,{title:"Settings",theme:"secondary",href:"/settings/integrations/embed"})])]),t("div",U,[t("div",j,[i[3]||(i[3]=t("div",{class:"size-12 aspect-square rounded-[10px] outline-black/5 outline outline-[1px] outline-offset-[-1px] overflow-hidden shrink-0"},[t("img",{src:"/integrations/mailerlite.svg",class:"w-full h-full"}
1)],-1)),e(c,{title:"MailerLite",subtitle:"Sync your clients with MailerLite."})]),t("div",P,[n.mailerliteConnected?(r(),m(d,{key:1},[e(l,{title:"Disconnect",theme:"ghost",onClick:s.disconnectMailerLite},null,8,["onClick"]),e(l,{title:"Settings",theme:"secondary",onClick:s.openMailerLiteDialog},null,8,["onClick"])],64)):(r(),_(l,{key:0,title:"Connect",theme:"secondary",onClick:s.openMailerLiteDialog},null,8,["onClick"]))])]),t("div",z,[t("div",B,[i[4]||(i[4]=t("div",{class:"size-12 aspect-square rounded-[10px] outline-black/5 outline outline-[1px] outline-offset-[-1px] overflow-hidden shrink-0 flex items-center justify-center bg-white"},[t("img",{src:"/integrations/google-tag-manager.svg",class:"size-8"})],-1)),e(c,{title:"Google Tag Manager / GA4",subtitle:"Add your GTM container or GA4 measurement ID to track conversions and ad clicks on your profile page."})]),t("div",q,[n.gtmConnected?(r(),m(d,{key:1},[e(l,{title:"Disconnect",theme:"ghost",onClick:s.disconnectGtm},null,8,["onClick"]),e(l,{title:"Settings",theme:"secondary",onClick:s.openGtmDialog},null,8,["onClick"])],64)):(r(),_(l,{key:0,title:"Connect",theme:"secondary",onClick:s.openGtmDialog},null,8,["onClick"]))])])]),e(p,{open:n.gtmDialog,title:"Google Tag Manager / GA4","onUpdate:open":s.closeGtmDialog},{subtitle:a(()=>[...i[5]||(i[5]=[f(" Enter your GTM container ID or GA4 measurement ID to track visits and conversions on your profile page. ",-1)])]),"footer-append":a(()=>[e(l,{title:"Save",onClick:s.saveGtm,loading:n.gtmSaving},null,8,["onClick","loading"])]),default:a(()=>[t("div",N,[e(u,{modelValue:n.gtmContainerId,"onUpdate:modelValue":i[0]||(i[0]=g=>n.gtmContainerId=g),placeholder:"GTM-XXXXXXX or G-XXXXXXXXXX",errors:n.gtmErrors?.google_tracking_id},null,8,["modelValue","errors"])])]),_:1},8,["open","onUpdate:open"]),e(p,{open:n.mailerLiteDialog,title:n.mailerliteConnected?"Update Connection":"Connect MailerLite","onUpdate:open":s.closeMailerLiteDialog},{subtitle:a(()=>[...i[6]||(i[6]=[f(" Enter your MailerLite API key to automatically sync clients to your email list. ",-1)])]),"footer-append":a(()=>[e(l,{title:"Connect",onClick:s.saveApiKey,loading:n.saving},null,8,["onClick","loading"])]),default:a(()=>[t("div",F,[e(u,{modelValue:n.apiKey,"onUpdate:modelValue":i[1]||(i[1]=g=>n.apiKey=g),placeholder:"Enter your MailerLite API key",errors:n.errors?.mailerlite_api_key},null,8,["modelValue","errors"])])]),_:1},8,["open","title","onUpdate:open"])]),_:1})],64)}const ge=C(E,[["render",O]]);export{ge as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.