import{p as V,m as J,E as K,G as Q,u as X,k as M,n as ee,r as te,f as oe,H as T,U as B,c as a,g as L,a as o,h as u,j as d,i,t as b,s as x,F as c,y as v,d as g,I as H,J as le,o as n,K as se,x as ie}from"./wh-ni0OP.js";import{s as ae}from"./Cj48imtc.js";const ne=V("/images/embed-automations.gif"),pe=V("/images/wizard.svg"),re={class:"py-32 desktop:py-24 laptop:py-20 tablet-p:py-16 bg-[#FAF6F0]",id:"createEmbed"},de={class:"container"},ce={id:"embed-builder"},he={class:"flex bg-skin-tertiary relative p-10 pl-32 tablet-p:pl-24 tablet-p:p-8 phone:p-6 rounded-xl items-center tablet-p:flex-col tablet-p:items-start tablet-p:gap-2"},ge={key:0,class:"flex flex-col gap-1 tablet-p:w-full relative"},ue={class:"flex items-center gap-3 h-11 laptop:h-10 rounded-md bg-white pl-4 laptop:pl-3"},be=["src"],fe={class:"text-sm font-bold text-skin-primary tablet-p:flex-1"},me={key:1,class:"phone:w-full",id:"searchAppBuilder"},xe={class:"flex rounded-md bg-white min-w-[350px] tablet-p:min-w-full"},ve={class:"flex-1"},we={key:0,class:"bg-white absolute min-w-[440px] rounded-xl mt-2 border border-skin-primary shadow-2xl phone:min-w-[360px] z-10",id:"appConnectionDropdownList"},ye={class:"grid grid-cols-3 overflow-auto max-h-64 gap-[1px] p-5 scrollbar-thin scrollbar-thumb-slate-700 scrollbar-track-gray-100 mr-3"},Ce={class:"flex"},ke=["onClick"],Le=["src"],Ae={class:"block truncate max-w-[100px] phone:max-w-[80px]"},_e={key:2,class:"showCustom"},Se={class:"flex items-center gap-3 px-8 desktop:px-6 tablet-p:px-0 text-white tablet-p:py-3"},Ie={key:3,class:"flex items-center gap-3 text-white"},Me={key:0},Te={key:0,class:"border-2 bg-white border-skin-brand-solid rounded-xl p-9 tablet-p:p-6 phone:p-4 relative before:inline-flex before:h-8 before:px-4 before:rounded-3xl before:bg-skin-brand-solid before:text-white before:absolute before:-top-4 before:left-4 before:items-center before:content-['Preview'] mt-16 desktop:mt-12 tablet-p:mt-10"},Be={key:0,class:"itlLoader"},He={class:"itlIntegrationWidget"},Ve={class:"flex items-center py-4 itlIntegrateAppIcons"},Ue=["src"],De=["onClick"],Ee={class:"itlDropdown itlSearchAppDropdown"},ze={class:"itlAppSearchContainer"},je={class:"itlSearchInput"},Fe={key:0,id:"appConnectionDropdownList",style:{display:"block"},class:"itlDropdownList"},$e={class:"itlScrollbar"},Re={key:0,class:"flex"},Pe=["onClick"],Ze=["src"],Oe={class:"block truncate max-w-[100px] phone:max-w-[80px]"},qe={key:0,class:"itlIntegrateAppIcon customAppIcon new",style:{border:"2px solid rgb(63, 56, 102)"}},Ye={key:0,class:"itlIntegrationTemplatesFound"},Ne={class:"text-skin-brand-primary"},We={class:"itlIntegrationListContainer"},Ge={key:0,class:"itlLoader"},Je=["onUpdate:modelValue"],Ke={class:"iltIntegrationListAppIcons"},Qe={class:"iltIntegrationAppIcons"},Xe={class:"iltIntegrationAppIcon"},et=["src"],tt={class:"iltIntegrationListItemTxt"},ot={class:"iltIntegrationListItemAction"},lt=["onClick"],st={key:1,class:"noTemplatesMsg"},it={key:1,class:"copyCodeWrapper"},at={key:0,class:"itlCopiedBtn"},nt={key:1,class:"itlCopyCodeBtn"},pt={key:1,class:"mt-16 desktop:mt-12 tablet-p:mt-10"},rt={key:0,class:"text-center"},dt={key:1,id:"integrately-embed",class:"border-2 bg-white border-skin-brand-solid rounded-xl p-9 tablet-p:p-6 phone:p-4 relative before:inline-flex before:h-8 before:px-4 before:rounded-3xl before:bg-skin-brand-solid before:text-white before:absolute before:-top-4 before:left-4 before:items-center before:content-['Preview']"},ct={key:2,class:"h-32 desktop:h-24 laptop:h-20 tablet-p:h-16"},ht={class:"copyCodeSection",id:"copyCodeSection"},gt={class:"flex bg-skin-primary-solid items-end gap-4 rounded-2xl laptop:rounded-xl p-12 desktop:p-10 laptop:p-8 tablet-p:p-6 tablet-p:flex-col tablet-p:items-start"},ut={key:0},bt={key:1},ft={key:3,class:"fixed top-0 right-0 bottom-0 left-0 bg-black/60 flex items-center justify-center z-20"},mt={class:"inline-flex bg-white rounded-xl flex-col justify-center text-center font-base max-w-sm p-6 pt-44 bg-[url(/images/widget-automation-count-modal-bg.png)] bg-no-repeat"},xt={class:"itlEmbedderCountModalContent"},vt={class:"text-skin-brand-primary text-3xl font-extrabold"},wt={class:"text-lg font-bold mb-8"},yt={class:"text-skin-brand-primary"},At={__name:"embed",setup(Ct){const U=J(),f=K(),A=Q();X({title:"Embed Automations",description:"Embed the widget in your app in 2 minutes & help your users integrate your app with other apps in 1 click.",link:[{rel:"canonical",href:M().url.canonicalURL}]}),ee({contentType:"text/html; charset=UTF-8",title:"Embed Automations",description:"Embed the widget in your app in 2 minutes & help your users integrate your app with other apps in 1 click.",ogTitle:"Embed Automations",ogUrl:M().url.canonicalURL,ogDescription:"Embed the widget in your app in 2 minutes & help your users integrate your app with other apps in 1 click.",ogImage:"https://integrately.com/images/embed-automations.png",ogType:"website",twitterTitle:"Embed Automations",twitterDescription:"Embed the widget in your app in 2 minutes & help your users integrate your app with other apps in 1 click.",twitterImage:"https://integrately.com/images/embed-automations.png",twitterCard:"summary_large_image",fbAppId:"301553917773270",msapplicationTileColor:"#ffffff",msapplicationTileImage:"/images/fav/ms-icon-144x144.png",themeColor:"#ffffff",viewport:"width=device-width, initial-scale=1"});const e=te({apps:null,selectedApp:null,showSelectAppDropdown:!1,searchApp:"",showCustom:!0,limit:10,showStrict:!1,copyCode:"",isContentCopied:!1,showCountModal:!1,totalTemplates:0,baseUrl:null,isBlog:!1,blog:{isLoading:!1,strict:!1,fallbackStrict:!1,storeTemplates:[],startFrom:0,limit:5e3,selectedApps:[],showList:!1,showSelectAppDropdown:!1,preSelectedApp:null,staticHTML:{show:!1,content:""}}});oe(async()=>{var s=y("blog");s&&s=="true"&&(e.isBlog=!0,e.baseUrl=E()),e.isBlog?z():(await D(),m())});async function D(){var s=y("appname");if(s)for(var t=0;t1&&(e.blog.strict=!0,e.blog.fallbackStrict=!0);var s={ActionsIds:[],AppIds:t,Limit:e.blog.limit,Start:e.blog.startFrom,Strict:e.blog.strict,FallbackStrict:e.blog.fallbackStrict};await $fetch("/api/integrations/filter-templates",{method:"POST",body:s,onResponse({request:p,response:l,options:r}){if(l._data.success){let h=l._data;h.data&&h.data.length>0?(h.data.forEach(function(k){k.isSelected=!1}),e.blog.storeTemplates=h.data,e.blog.showList=!0):e.blog.storeTemplates=[]}else e.blog.showList=!1;e.blog.staticHTML={show:!1,content:""},e.blog.isLoading=!1},onResponseError({request:p,response:l,options:r}){e.isLoading=!1}}),e.blog.staticHTML={show:!1,content:""},e.blog.isLoading=!1}catch(t){console.log(t)}}function j(){var s=[];return e.blog.selectedApps.forEach(function(t){s.push(t.id)}),s}function F(s){var t="63 56 102";s.primaryColor&&(t=s.primaryColor);var p=`border:2px solid rgb(${t});`;return p}function $(){var s="";e.blog.storeTemplates.forEach(function(t){if(t.isSelected){let p=R(t),l=P(t.apps),r=q(t.apps);s+=`
${r}

${t.template.name}

`}}),s!=""?(e.blog.staticHTML.content=`
${s}
`,e.blog.staticHTML.show=!0):e.blog.staticHTML={show:!1,content:""}}function R(s){return B.getAppURL()+"/signup?from=web&ct=1&code="+s.installationCode}function P(s){let t=Z();return t+="/i/integrations/",t=O(s,t),t}function Z(){return T().hostname=="integrately.com"?"https://app.integrately.com":"https://test.integrately.com"}function O(s,t){if(s&&s.length>0){let p=[];for(let l=0;l1&&(t+="_"),t+=r.slug)}p.length>0&&(t+="_integrations.png")}return t}function q(s,t){let p="";if(s&&s.length>0){let r=[];for(let h=0;h0&&(r.length>1?p+=" Integration":p+=" Integrations")}return p}function m(s){var t=document.querySelector("#integrately-embed");t&&(t.innerHTML="");var p=B.getEmbedScriptURL();e.showSelectAppDropdown=!1;var l;if(e.selectedApp?l=p+"/embed?apps="+e.selectedApp.name+"&limit="+e.limit+"&custom="+e.showCustom+"&strict="+e.showStrict:l=p+"/embed?limit="+e.limit+"&custom="+e.showCustom,e.copyCode=`