import{b as k,c as V,d as N}from"./vue-flow-core-3a3ff73f.js";import{_ as B}from"./FormSelect-c7672027.js";import{_ as S}from"./FormTextArea-e893dff2.js";import{D as q,r as d,G as g,o as i,c as r,a as t,d as y,b as x,k as p,f as m,n as v,u as w}from"./app-a39c937f.js";const C="/build/assets/icon_Start-6360fae9.png",P={class:"max-w-[520px] rounded-sm border border-gray-200 bg-white p-3 shadow-md"},T={class:"flex flex-col gap-y-4"},z={key:0,class:"flex items-center gap-x-2 bg-red-500 text-white rounded-md px-2 py-2"},F={class:"rounded-md bg-muted"},$={class:"mb-4"},D={key:0},U=q({__name:"start-node",props:{id:{},type:{},selected:{type:Boolean},connectable:{type:[Boolean,Number,String,Function]},position:{},dimensions:{},label:{},isValidTargetPos:{type:Function},isValidSourcePos:{type:Function},parent:{},parentNodeId:{},dragging:{type:Boolean},resizing:{type:Boolean},zIndex:{},targetPosition:{},sourcePosition:{},dragHandle:{},data:{},events:{}},setup(b){var u,f;const c=b,a=d(((u=c.data.metadata)==null?void 0:u.fields.type)||""),l=d(((f=c.data.metadata)==null?void 0:f.fields.keywords)||""),_=d([{value:"new_contact",label:"New contact"},{value:"keywords",label:"Text contains specific keywords"}]);g(a,s=>{o.node.data.metadata.fields={...o.node.data.metadata.fields,type:s,keywords:null}}),g(l,s=>{o.node.data.metadata.fields={...o.node.data.metadata.fields,type:a,keywords:s}});const h=(s,e)=>e.length<=0,o=k();return(s,e)=>(i(),r("div",P,[t("div",T,[e[5]||(e[5]=y('<div class="flex justify-between"><div class="flex items-center gap-x-2"><img src="'+C+'" class="h-4 w-4" alt="Start icon"><div class="flex flex-col gap-y-1"><p class="text-sm text-gray-500">Trigger</p></div></div></div>',1)),a.value==="keywords"&&l.value==""?(i(),r("div",z,e[2]||(e[2]=[y('<span><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="m13.299 3.148l8.634 14.954a1.5 1.5 0 0 1-1.299 2.25H3.366a1.5 1.5 0 0 1-1.299-2.25l8.634-14.954c.577-1 2.02-1 2.598 0M12 15a1 1 0 1 0 0 2a1 1 0 0 0 0-2m0-7a1 1 0 0 0-.993.883L11 9v4a1 1 0 0 0 1.993.117L13 13V9a1 1 0 0 0-1-1"></path></g></svg></span><span class="text-sm">Please fill all the required fields</span>',2)]))):x("",!0),e[6]||(e[6]=t("span",{class:"text-sm text-gray-500"},[p("Define the input parameters to trigger the workflow, to ensure that "),t("br"),p(" accurate information is captured in the conversation flow.")],-1)),t("div",F,[t("div",$,[e[3]||(e[3]=t("label",{class:"text-sm mb-2"},"Starting Step",-1)),m(B,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=n=>a.value=n),name:"",type:"text",optionClassName:"h-32",options:_.value,class:v("col-span-4")},null,8,["modelValue","options"])]),a.value==="keywords"?(i(),r("div",D,[e[4]||(e[4]=t("label",{class:"text-sm mb-2"},[t("span",{class:"text-red-500"},"*"),p(" Trigger keywords")],-1)),m(S,{modelValue:l.value,"onUpdate:modelValue":e[1]||(e[1]=n=>l.value=n),name:"",placeholder:"Enter keywords separated by a comma",type:"text",class:v("col-span-4")},null,8,["modelValue"])])):x("",!0)])]),m(w(N),{type:"source",position:w(V).Right,connectable:h},null,8,["position"])]))}});export{U as _};
