1import{C as Z}from"./useDraftAutosave-JRlf71I3.js";import ge from"./ProductPicker-DbMPmflj.js";import fe from"./PostProducts-BWhPou6P.js";import{F as p}from"./SelectField-C54iroKJ.js";import{V as be}from"./VoiceRecorder-DAoXepdj.js";import{_ as ke}from"./useLineDiscountEditor-QLOawFdF.js";import{u as we,s as Se,_ as h,U as B}from"./useVendorPushNotifications-uP2Y5bb4.js";import Ue from"./RulesEditor-CJJcfi6c.js";import{u as Ce,s as Ve,v as _e,d as Ae,j as $e}from"./PersonTimeline-BqPSIeNo.js";import{d as ze,c as m,r as $,C as Fe,f as a,h as o,F as y,j as l,w as i,n as W,p as c,x as k,g as d,l as V,q as g,E as H,i as f,V as Ne,ap as xe}from"./storefront-section-blog-header-Ch7Ns0HC.js";import"./useBlogApi-BRs0zzgk.js";import"./productContentBlocks-DhkVUbug.js";import"./productTaxonomy-zDeeeHiH.js";import"./useAutoPopupSlot-CRpfnswg.js";import"./storefront-section-blog-post-DCPfGkQN.js";import"./idempotency-Dw0zDR0H.js";import"./measuredStock-SZ-aNCJk.js";import"./IntlPhoneInput-BrJE8BrX.js";import"./Select-BrjBmWZJ.js";import"./wholesaleTiers-B4fZ_Nh-.js";const Ie={class:"pop-head"},Te={class:"pop-titles"},Ee={class:"p-eye"},We={class:"p-title"},Oe={class:"field"},Pe=["checked","onChange"],je={key:0,class:"r-s"},Me={key:1,class:"field"},De=["checked","onChange"],Be={class:"r-s"},He={key:2,class:"note"},Le={class:"vars"},Re=["title","onClick"],Ye={class:"field"},Ge={class:"field"},Je={class:"wa-b"},qe={key:0,class:"dm-btn"},Ke={key:1,class:"dm-btn"},Qe={key:5,class:"note"},Xe={key:6,class:"note"},Ze={key:7,class:"note"},et={key:8,class:"note"},tt={key:9,class:"note"},lt={key:10,class:"note"},ot={class:"note"},st={key:0,class:"banner-inline"},at={key:2,class:"note"},nt={key:0,class:"ev-card"},it={class:"tile t-wa"},ut={key:2,class:"form-field-hint"},rt={key:3,class:"n-err"},dt={class:"vars"},pt=["onClick"],mt={class:"note"},vt={class:"row-2"},ct={key:2,class:"row-2"},yt={class:"field"},ht={class:"ev-card"},gt={class:"tile t-trig"},ft={class:"ev-t"},bt={class:"row-2"},kt={class:"field"},wt={class:"vars"},St=["title","onClick"],Ut={class:"note"},Ct={key:11,class:"note"},Vt={key:0},_t={key:1},At={class:"vars"},$t=["title","onClick"],zt={class:"note"},Ft={class:"note"},Nt={class:"pop-foot"},xt="/ejiro/channels",Zt=ze({__name:"StepSettings",props:{step:{}},emits:["close","changeEvent"],setup(u,{emit:ee}){const U=we(),O={whatsapp:"WhatsApp",instagram:"Instagram",facebook:"Facebook"},te=m(()=>{const n=v.flow.value;if(n.trigger_type==="comment_received")return["instagram"];const e=n.trigger_config?.channels??[];return e.length?e:Object.keys(O)}),L=m(()=>{const n=v.catalog.value,e=n.ejiro_channels??{whatsapp:!!n.ejiro_replies};return Object.keys(O).filter(b=>te.value.includes(b)&&!e[b]).map(b=>O[b])}),w=u,R=ee,v=Ce(),s=m(()=>w.step.config),le=m(()=>Se(w.step.type)),_=m(()=>Ve(w.step,{groups:v.catalog.value.groups,ruleFields:v.catalog.value.rule_fields,triggers:v.catalog.value.triggers})),oe=m(()=>["send_whatsapp","send_sms","reply_privately","send_reply","check_follows","checkout_link_reply"].includes(w.step.type)),P=m(()=>v.trigger.value?.key==="comment_received"),se=m(()=>v.flow.value.trigger_config?.media_ids??[]),ae=m(()=>[P.value?["post","The product in the post they commented on","Link each post to the product it shows"]:["ad","The product in the ad they came from",`Read from the ad the way ${U.value} reads it`],["product","A product you pick",""]]),z=m(()=>String(s.value.source??(P.value?"post":"ad"))),ne=m(()=>w.step.type==="notify_staff"?"message":w.step.type==="post_status"?"caption":null),ie=m(()=>(v.catalog.value.team??[]).map(n=>({value:n.id,label:n.name}))),ue=[{code:"{checkout_link}",desc:"The checkout link made for them"},{code:"{product_name}",desc:"The product in the link"},{code:"{product_link}",desc:"The product's page"}],F=m(()=>{const n=_e(v.trigger.value,v.flow.value.trigger_config);return["message_received","comment_received"].includes(v.trigger.value?.key??"")?[...n,...ue]:n});function r(n,e){s.value[n]=e,v.changed()}const A=$(null);function N(n){const e=w.step.type==="send_email"?"body":ne.value??"message",b=A.value?.querySelector("textarea"),t=String(s.value[e]??""),S=b?.selectionStart??t.length;v.snapshot(),r(e,t.slice(0,S)+n+t.slice(b?.selectionEnd??S))}const re={first_name:"Adaeze",name:"Adaeze Okafor",store_name:"Your store",product_name:"Ankara Wrap Dress",order_number:"#1042",cart_link:"yourstore.bizthom.com/bag",product_link:"yourstore.bizthom.com/p/ankara",store_link:"yourstore.bizthom.com",spin_link:"yourstore.bizthom.com/?spin=1"},de=m(()=>String(s.value.message??"").replace(/\{(\w+)\}/g,(n,e)=>re[e]??`[${e.replace(/_/g," ")}]`)),pe=m(()=>Math.max(1,Math.ceil(String(s.value.message??"").length/160))),j=m(()=>s.value.timeout??{duration:2,unit:"days"});function Y(n,e){r("timeout",{...j.value,[n]:n==="duration"?Number(e):e})}const G=m(()=>v.catalog.value.triggers.find(n=>n.key===s.value.event)),J=m(()=>Object.entries(G.value?.statuses??{}).map(([n,e])=>({value:n,label:e}))),me=m(()=>v.catalog.value.rule_fields.map(n=>({value:n.key,label:n.label}))),x=m(()=>Object.entries(v.trigger.value?.times??{}).map(([n,e])=>({value:n,label:e}))),q=m(()=>String(s.value.mode??"duration")),M=m(()=>s.value.offset??{duration:30,unit:"minutes"});function ve(n){n==="until"?(r("mode","until"),s.value.field||r("field",x.value[0]?.value??""),s.value.offset||r("offset",{duration:30,unit:"minutes"})):r("mode","duration")}function K(n,e){r("offset",{...M.value,[n]:n==="duration"?Number(e):e})}const Q=$(null),D=$(!1),I=$(null);async function ce(n){if(Q.value=n,!!n){D.value=!0,I.value=null;try{const e=new FormData;e.append("voice",n,n.name||"recording.webm");const b=await Ne.post("/automations/upload-voice",e,{headers:{"Content-Type":"multipart/form-data"}});v.snapshot(),r("voice_url",b.data.data.url)}catch(e){I.value=xe(e,"Upload failed. Please try again.")}finally{D.value=!1}}}const X=m(()=>v.catalog.value.groups.map(n=>({value:n.id,label:n.name}))),T=$(!1),C=m(()=>{const n=le.value?.branches;if(!n||!w.step.paths)return null;const[e,b]=n[1];return{label:b,count:Ae(w.step.paths[e]??[]),keepLabel:n[0][1]}});function ye(){C.value?T.value=!0:v.remove(w.step.key)}return(n,e)=>{const b=Fe("router-link");return o(),a(y,null,[l("div",Ie,[l("span",{class:W(["tile",_.value.tile?`t-${_.value.tile}`:""])},[i(h,{name:_.value.icon},null,8,["name"])],2),l("div",Te,[l("span",Ee,c(_.value.eye),1),l("div",We,c(_.value.title),
11)]),l("button",{type:"button",class:"icon-btn sm","aria-label":"Close",onClick:e[0]||(e[0]=t=>R("close"))},[i(h,{name:"x"})])]),l("div",{class:"pop-scroll",onFocusin:e[33]||(e[33]=t=>f(v).snapshot())},[oe.value?(o(),a(y,{key:0},[u.step.type==="checkout_link_reply"?(o(),a(y,{key:0},[l("div",Oe,[e[37]||(e[37]=l("span",{class:"label"},"Product",-1)),(o(!0),a(y,null,V(ae.value,([t,S,E])=>(o(),a("label",{key:t,class:W(["radio",{checked:z.value===t}])},[l("input",{type:"radio",checked:z.value===t,onChange:he=>r("source",t)},null,40,Pe),l("span",null,[g(c(S)+" ",1),E?(o(),a("span",je,c(E),1)):d("",!0)])],2))),128)),s.value.source==="product"?(o(),k(ge,{key:0,"model-value":s.value.product_id??null,placeholder:"Search productsâ¦","onUpdate:modelValue":e[1]||(e[1]=t=>r("product_id",t))},null,8,["model-value"])):d("",!0)]),P.value&&z.value==="post"?(o(),k(fe,{key:0,"media-ids":se.value},null,8,["media-ids"])):d("",!0)],64)):d("",!0),u.step.type==="reply_privately"?(o(),a("div",Me,[e[38]||(e[38]=l("span",{class:"label"},"How",-1)),(o(),a(y,null,V([["ask","Ask first (recommended)","They tap a button, then the steps after this run in their DMs."],["now","Just this message","No button. Nothing else can be sent until they write back."]],([t,S,E])=>l("label",{key:t,class:W(["radio",{checked:(s.value.mode??"ask")===t}])},[l("input",{type:"radio",checked:(s.value.mode??"ask")===t,onChange:he=>r("mode",t)},null,40,De),l("span",null,[g(c(S)+" ",1),l("span",Be,c(E),1)])],2)),64))])):d("",!0),u.step.type==="check_follows"?(o(),a("div",He,[i(h,{name:"userplus",size:16}),e[39]||(e[39]=l("span",null,[g(" Asks Instagram when this step runs, and again each time they tap or reply. "),l("b",null,"Followed"),g(" runs the steps under it. If they haven't yet, they get the message below and can tap again. ")],-1))])):d("",!0),l("div",{ref_key:"bodyField",ref:A},[i(p,{"model-value":String(s.value.message??""),label:u.step.type==="check_follows"?"If they haven't followed yet":"Message",type:"textarea",placeholder:"Write the messageâ¦",hint:u.step.type==="send_sms"?`${String(s.value.message??"").length} / 160 · ${pe.value} SMS`:"","onUpdate:modelValue":e[2]||(e[2]=t=>r("message",t))},null,8,["model-value","label","hint"])],512),l("div",Le,[(o(!0),a(y,null,V(F.value,t=>(o(),a("button",{key:t.code,type:"button",class:"var-chip",title:t.desc,onClick:S=>N(t.code)},c(t.code.slice(1,-1).replace(/_/g," ")),9,Re))),128))]),u.step.type==="check_follows"?(o(),a(y,{key:3},[i(p,{"model-value":String(s.value.button??""),label:"Button","max-length":20,"onUpdate:modelValue":e[3]||(e[3]=t=>r("button",t))},null,8,["model-value"]),i(p,{"model-value":String(s.value.tries??3),label:"Tries",type:"select",options:[1,2,3,4,5].map(t=>({value:String(t),label:t===1?"Ask once":`Up to ${t} times`})),"onUpdate:modelValue":e[4]||(e[4]=t=>r("tries",Number(t)))},null,8,["model-value","options"])],64)):d("",!0),u.step.type==="reply_privately"?(o(),a(y,{key:4},[(s.value.mode??"ask")==="ask"?(o(),k(p,{key:0,"model-value":String(s.value.button??""),label:"Button","max-length":20,"onUpdate:modelValue":e[5]||(e[5]=t=>r("button",t))},null,8,["model-value"])):d("",!0),l("div",Ye,[i(Z,{"model-value":s.value.public_reply===!0,"onUpdate:modelValue":e[6]||(e[6]=t=>r("public_reply",t===!0))},{default:H(()=>[...e[40]||(e[40]=[g(" Also reply under their comment ",-1)])]),_:1},8,["model-value"])]),s.value.public_reply===!0?(o(),k(p,{key:1,"model-value":String(s.value.public_replies??""),label:"Replies, one per line",type:"textarea",hint:"Others see you answered. One is picked at random each time, so Instagram doesn't see the same words every time.","onUpdate:modelValue":e[7]||(e[7]=t=>r("public_replies",t))},null,8,["model-value"])):d("",!0)],64)):d("",!0),l("div",Ge,[e[42]||(e[42]=l("span",{class:"label"},"Preview",-1)),l("div",{class:W(u.step.type==="send_sms"?"sms-prev":"wa-prev")},[l("div",Je,[g(c(de.value||"Your message shows here")+" ",1),e[41]||(e[41]=l("span",{class:"t"},"9:14",-1))]),u.step.type==="reply_privately"&&(s.value.mode??"ask")==="ask"?(o(),a("span",qe,c(s.value.button||"Tell me more"),1)):d("",!0),u.step.type==="check_follows"&&s.value.button?(o(),a("span",Ke,c(s.value.button),1)):d("",!0)],2)]),u.step.type==="send_whatsapp"?(o(),a("div",Qe,[i(h,{name:"card",size:16}),e[43]||(e[43]=l("span",null,[g(" Paid from your wallet. If WhatsApp is disconnected this step is "),l("b",null,"skipped"),g(" and the rest still runs. ")],-1))])):d("",!0),u.step.type==="check_follows"?(o(),a("div",Xe,[i(
1h,{name:"clock",size:16}),e[44]||(e[44]=l("span",null,[g(" Instagram lets you message them for 24 hours after they last wrote or tapped. When the tries or the 24 hours run out, "),l("b",null,"Didn't follow"),g(" runs. Free to send. ")],-1))])):d("",!0),u.step.type==="reply_privately"?(o(),a("div",Ze,[i(h,{name:"clock",size:16}),e[45]||(e[45]=l("span",null," Instagram allows this one message per comment, within 7 days of it. With Ask first, the steps after this wait up to those 7 days for their tap; no tap ends the automation. Free to send. ",-1))])):d("",!0),u.step.type==="checkout_link_reply"?(o(),a("div",et,[i(h,{name:"card",size:16}),l("span",null," One link per chat, open for 7 days. A product with sizes or colours gets its page instead, so they pick one first. "+c(z.value==="post"?"A comment on a post with no product skips this, so keep Hand to the team after it.":`If no product matches, this is skipped: add Hand to ${f(U)} or Hand to the team after it.`),1)])):d("",!0),u.step.type==="send_reply"||u.step.type==="checkout_link_reply"?(o(),a("div",tt,[i(h,{name:"message",size:16}),e[46]||(e[46]=l("span",null," Free: they started the chat. WhatsApp replies can go any time; on Instagram and Facebook only within 24 hours of their last message, else it's skipped. ",-1))])):d("",!0),u.step.type==="send_sms"?(o(),a("div",lt,[i(h,{name:"clock",size:16}),e[47]||(e[47]=l("span",null,"An SMS due between 8pm and 8am is held and sent at 8am.",-1))])):d("",!0)],64)):u.step.type==="hand_to_ejiro"?(o(),a(y,{key:1},[l("div",ot,[i(h,{name:"ejiro",size:16}),l("span",null,c(f(U))+" answers this chat from here, starting with their last message. It counts as one of "+c(f(U))+"'s chats. Where "+c(f(U))+" isn't switched on for the chat's channel, the chat goes to your team. ",1)]),L.value.length?(o(),a("div",st,[l("span",null,[l("b",null,c(f(U))+" isn't replying on "+c(L.value.join(" or "))+" for your store. ",1),e[48]||(e[48]=g(" Until you switch it on, those chats go to your team instead. ",-1))]),i(b,{to:xt,class:"dash-btn dash-btn-primary dash-btn-sm"},{default:H(()=>[g(" Switch on "+c(f(U)),1)]),_:1})])):d("",!0)],64)):u.step.type==="hand_to_team"?(o(),a("div",at,[i(h,{name:"users",size:16}),l("span",null," A person answers this chat: "+c(f(U))+" stays out of it and you're told it needs a reply. ",1)])):u.step.type==="send_whatsapp_voice"?(o(),a(y,{key:3},[s.value.voice_url?(o(),a("div",nt,[l("span",it,[i(h,{name:"mic"})]),e[49]||(e[49]=l("div",null,[l("div",{class:"ev-t"},"Voice note ready"),l("div",{class:"ev-d"},"Sent as a WhatsApp voice note")],-1)),l("button",{type:"button",class:"dash-btn dash-btn-secondary dash-btn-sm",onClick:e[8]||(e[8]=t=>r("voice_url",""))}," Remove ")])):(o(),k(be,{key:1,"model-value":Q.value,hint:"Up to 60 seconds. The same note goes to everyone.","max-duration":60,compact:"","onUpdate:modelValue":ce},null,8,["model-value"])),D.value?(o(),a("p",ut,"Uploadingâ¦")):d("",!0),I.value?(o(),a("p",rt,c(I.value),1)):d("",!0)],64)):u.step.type==="send_email"?(o(),a(y,{key:4},[i(p,{"model-value":String(s.value.subject??""),label:"Subject","onUpdate:modelValue":e[9]||(e[9]=t=>r("subject",t))},null,8,["model-value"]),l("div",{ref_key:"bodyField",ref:A},[i(p,{"model-value":String(s.value.body??s.value.message??""),label:"Message",type:"textarea",placeholder:"Write the emailâ¦","onUpdate:modelValue":e[10]||(e[10]=t=>r("body",t))},null,8,["model-value"])],512),l("div",dt,[(o(!0),a(y,null,V(F.value,t=>(o(),a("button",{key:t.code,type:"button",class:"var-chip",onClick:S=>N(t.code)},c(t.code.slice(1,-1).replace(/_/g," ")),9,pt))),128))]),l("div",mt,[i(h,{name:"mail",size:16}),e[50]||(e[50]=l("span",null,"Contacts without an email address skip this step.",-1))])],64)):u.step.type==="wait"?(o(),a(y,{key:5},[x.value.length?(o(),k(p,{key:0,"model-value":q.value,label:"Wait",type:"select",options:[{value:"duration",label:"For a set time"},{value:"until",label:"Until a time in the event"}],"onUpdate:modelValue":e[11]||(e[11]=t=>ve(String(t)))},null,8,["model-value"])):d("",!0),q.value==="until"&&x.value.length?(o(),a(y,{key:1},[i(p,{"model-value":String(s.value.field??""),label:"Time",type:"select",options:x.value,"onUpdate:modelValue":e[12]||(e[12]=t=>r("field",t))}
1,null,8,["model-value","options"]),l("div",vt,[i(p,{"model-value":Number(M.value.duration),label:"How long before",type:"number","onUpdate:modelValue":e[13]||(e[13]=t=>K("duration",t))},null,8,["model-value"]),i(p,{"model-value":String(M.value.unit),label:"Unit",type:"select",options:f(B),"onUpdate:modelValue":e[14]||(e[14]=t=>K("unit",t))},null,8,["model-value","options"])]),e[51]||(e[51]=l("p",{class:"form-field-hint"}," Uses each person's own time. If they don't have one (a reward that never expires), their run ends here. ",-1))],64)):(o(),a("div",ct,[i(p,{"model-value":Number(s.value.duration),label:"Wait for",type:"number","onUpdate:modelValue":e[15]||(e[15]=t=>r("duration",Number(t)))},null,8,["model-value"]),i(p,{"model-value":String(s.value.unit),label:"Unit",type:"select",options:f(B),"onUpdate:modelValue":e[16]||(e[16]=t=>r("unit",t))},null,8,["model-value","options"])])),e[52]||(e[52]=l("p",{class:"form-field-hint"},"Then they carry on to the next step.",-1))],64)):u.step.type==="wait_event"?(o(),a(y,{key:6},[l("div",yt,[e[54]||(e[54]=l("span",{class:"label"},"Wait until",-1)),l("div",ht,[l("span",gt,[i(h,{name:G.value?.icon??"reply"},null,8,["name"])]),l("div",null,[l("div",ft,c(f($e)(String(s.value.event??""),f(v).catalog.value.triggers)),1),e[53]||(e[53]=l("div",{class:"ev-d"}," Only counts if it happens to this person after they get here. ",-1))]),l("button",{type:"button",class:"dash-btn dash-btn-secondary dash-btn-sm",onClick:e[17]||(e[17]=t=>R("changeEvent"))}," Change ")])]),J.value.length?(o(),k(p,{key:0,"model-value":s.value.to??[],label:"When it becomes",type:"select",multiple:"",placeholder:"Any change",options:J.value,"onUpdate:modelValue":e[18]||(e[18]=t=>r("to",t))},null,8,["model-value","options"])):d("",!0),s.value.event==="joined_group"?(o(),k(p,{key:1,"model-value":s.value.group_id??null,label:"Group",type:"select",placeholder:"Any group",options:X.value,"onUpdate:modelValue":e[19]||(e[19]=t=>r("group_id",t))},null,8,["model-value","options"])):d("",!0),s.value.event==="contact_detail_changed"?(o(),a(y,{key:2},[i(p,{"model-value":s.value.field??null,label:"Detail",type:"select",placeholder:"Any detail",options:me.value,"onUpdate:modelValue":e[20]||(e[20]=t=>r("field",t))},null,8,["model-value","options"]),s.value.field?(o(),k(p,{key:0,"model-value":String(s.value.change??"set"),label:"When it",type:"select",options:[{value:"set",label:"Is filled in"},{value:"any",label:"Changes"},{value:"cleared",label:"Is cleared"}],"onUpdate:modelValue":e[21]||(e[21]=t=>r("change",t))},null,8,["model-value"])):d("",!0)],64)):d("",!0),l("div",bt,[i(p,{"model-value":Number(j.value.duration),label:"Stop waiting after",type:"number","onUpdate:modelValue":e[22]||(e[22]=t=>Y("duration",t))},null,8,["model-value"]),i(p,{"model-value":String(j.value.unit),label:"Unit",type:"select",options:f(B),"onUpdate:modelValue":e[23]||(e[23]=t=>Y("unit",t))},null,8,["model-value","options"])]),e[55]||(e[55]=l("p",{class:"form-field-hint"},` If it hasn't happened by then, they go the "Not within" way. `,-1))],64)):u.step.type==="condition"?(o(),a(y,{key:7},[i(p,{"model-value":String(s.value.name??""),label:"Question",placeholder:"e.g. Did they buy?",hint:"Shown on the canvas.","onUpdate:modelValue":e[24]||(e[24]=t=>r("name",t))},null,8,["model-value"]),l("div",kt,[e[56]||(e[56]=l("span",{class:"label"},"Yes if",-1)),i(Ue,{config:s.value,onUpdate:r},null,8,["config"]),e[57]||(e[57]=l("div",{class:"form-field-hint"},"Everyone else goes to No.",-1))])],64)):u.step.type==="add_to_group"||u.step.type==="remove_from_group"?(o(),k(p,{key:8,"model-value":s.value.group_id??null,label:"Group",type:"select",placeholder:"Choose a group",options:X.value,hint:u.step.type==="add_to_group"?"You can message this group from Campaigns.":"","onUpdate:modelValue":e[25]||(e[25]=t=>r("group_id",t))},null,8,["model-value","options","hint"])):u.step.type==="set_priority"?(o(),k(p,{key:9,"model-value":String(s.value.priority??"hot"),label:"Priority",type:"select",options:[{value:"hot",label:"Hot"},{value:"warm",label:"Warm"},{value:"cold",label:"Cold"}],"onUpdate:modelValue":e[26]||(e[26]=t=>r("priority",t))},null,8,["model-value"])):u.step.type==="notify_staff"?(o(),a(y,{key:10},[i(p,{"model-value":s.value.member_ids??[],label:"Tell",type:"select",multiple:"",placeholder:"You (the owner)",options:ie.value,"onUpdate:modelValue":e[27]||(e[27]=t=>r("member_ids",t))}
1,null,8,["model-value","options"]),l("div",{ref_key:"bodyField",ref:A},[i(p,{"model-value":String(s.value.message??""),label:"Message",type:"textarea",placeholder:"What should they know?","onUpdate:modelValue":e[28]||(e[28]=t=>r("message",t))},null,8,["model-value"])],512),l("div",wt,[(o(!0),a(y,null,V(F.value,t=>(o(),a("button",{key:t.code,type:"button",class:"var-chip",title:t.desc,onClick:S=>N(t.code)},c(t.code.slice(1,-1).replace(/_/g," ")),9,St))),128))]),i(Z,{"model-value":!!s.value.whatsapp,"onUpdate:modelValue":e[29]||(e[29]=t=>r("whatsapp",t))},{default:H(()=>[...e[58]||(e[58]=[g(" Also send it on WhatsApp, from your store's number ",-1)])]),_:1},8,["model-value"]),l("div",Ut,[i(h,{name:"bell",size:16}),e[59]||(e[59]=l("span",null,"Free. Goes to your team only, never to customers.",-1))])],64)):u.step.type==="hide_product"||u.step.type==="show_product"?(o(),a("div",Ct,[i(h,{name:u.step.type==="hide_product"?"eyeoff":"eye",size:16},null,8,["name"]),u.step.type==="hide_product"?(o(),a("span",Vt," Takes the product that started this off your store. Nothing is deleted. If it's back in stock by the time this step runs, it's left on your store. ")):(o(),a("span",_t," Puts the product back on your store, but only if an automation hid it. A product you hid yourself stays hidden. "))])):u.step.type==="post_status"?(o(),a(y,{key:12},[l("div",{ref_key:"bodyField",ref:A},[i(p,{"model-value":String(s.value.caption??""),label:"Caption",type:"textarea","onUpdate:modelValue":e[30]||(e[30]=t=>r("caption",t))},null,8,["model-value"])],512),l("div",At,[(o(!0),a(y,null,V(F.value,t=>(o(),a("button",{key:t.code,type:"button",class:"var-chip",title:t.desc,onClick:S=>N(t.code)},c(t.code.slice(1,-1).replace(/_/g," ")),9,$t))),128))]),l("div",zt,[i(h,{name:"status",size:16}),e[60]||(e[60]=l("span",null," Posts the product's main photo from your linked phone, seen by people who messaged you in the last 90 days. At most one Status an hour from automations. Skipped when your phone isn't linked. ",-1))])],64)):u.step.type==="message_waiting"?(o(),a(y,{key:13},[i(p,{"model-value":String(s.value.audience_trigger??"back_in_stock"),label:"People waiting for",type:"select",options:[{value:"back_in_stock",label:"It to come back in stock"},{value:"price_drop",label:"A lower price"}],"onUpdate:modelValue":e[31]||(e[31]=t=>r("audience_trigger",t))},null,8,["model-value"]),l("div",Ft,[i(h,{name:"users",size:16}),e[61]||(e[61]=l("span",null,' Each person goes through the steps under "Each person waiting" on their own, like a customer automation. Messages go out a few at a time. ',-1))])],64)):u.step.type==="add_note"?(o(),k(p,{key:14,"model-value":String(s.value.note??""),label:"Note",type:"textarea",placeholder:"Came in from the restock alert",hint:"Shows on their contact page, for your team.","onUpdate:modelValue":e[32]||(e[32]=t=>r("note",t))},null,8,["model-value"])):d("",!0)],32),l("div",Nt,[l("button",{type:"button",class:"dash-btn dash-btn-danger dash-btn-sm",onClick:ye},[i(h,{name:"trash",size:15}),e[62]||(e[62]=g(" Delete ",-1))]),u.step.paths?d("",!0):(o(),a("button",{key:0,type:"button",class:"dash-btn dash-btn-secondary dash-btn-sm",onClick:e[34]||(e[34]=t=>f(v).duplicate(u.step.key))},[i(h,{name:"copy",size:15}),e[63]||(e[63]=g(" Duplicate ",-1))]))]),i(ke,{show:T.value,title:"Delete this step?",message:`The steps under ${C.value?.keepLabel} stay. ${C.value?.count?`The ${C.value.count} step(s) under ${C.value.label} are deleted too.`:`Nothing is under ${C.value?.label}.`}`,"confirm-label":"Delete","confirm-variant":"danger",onConfirm:e[35]||(e[35]=t=>(T.value=!1,f(v).remove(u.step.key))),onCancel:e[36]||(e[36]=t=>T.value=!1)},null,8,["show","message"])],64)}}});export{Zt 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.