Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Automation-a9c3df4c.js

import x from"./Layout-fcdad30a.js";import{r as d,T as A,i as y,g as h,o as v,a as t,t as i,c as k,b as B,k as F,f as I,u as w}from"./app-f1493ab2.js";import"./index-764662c4.js";import{d as S}from"./vuedraggable.umd-97e3a1cb.js";import"./App-45dbd9fa.js";import"./Sidebar-f2ddcf5a.js";import"./Menu-73c1148a.js";import"./Modal-a0814fa2.js";import"./transition-f32a8133.js";import"./hidden-f79cef22.js";import"./use-outside-click-92c6377f.js";import"./micro-task-89dcd6af.js";import"./ProfileModal-09ae28bb.js";import"./FormInput-b3450213.js";import"./tabs-80627b62.js";import"./LangToggle-d2b58a25.js";import"./index-114bea05.js";import"./MobileSidebar-e6661e49.js";/* empty css              */import"./pusher-a82d1614.js";const N={class:"md:h-[90vh]"},R={class:"flex justify-center items-center"},C={class:"md:w-[60em]"},V={class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4 pb-4 px-4 mb-20"},$={class:"w-full py-2 mb-2 mt-2"},M={class:"flex w-full mb-4"},j={class:"text-md"},E={class:"text-[16px]"},D={class:"flex items-center mt-1 text-slate-500"},O={key:0,class:"text-sm mt-2 bg-orange-100 px-2 py-1 rounded-md w-[fit-content]"},T={class:"flex gap-x-2 bg-slate-50 rounded-md mb-2 p-2 border w-[20em] cursor-pointer"},lt={__name:"Automation",props:["rows","filters","settings","modules"],setup(q){var p,f;const a=q,u=d(a.settings.metadata),l=d(u.value?JSON.parse(u.value):null),n=s=>{const e=a.modules.find(r=>r.name===s);return e&&e.status===1},g=d(["Basic Replies",n("Flow builder")?"Automated Flows":null,n("AI Assistant")?"AI Reply Assistant":null].filter(s=>s!==null)),m=A({response_sequence:((f=(p=l.value)==null?void 0:p.automation)==null?void 0:f.response_sequence)??g.value}),c={"Automated Flows":"Flow builder","AI Reply Assistant":"AI Assistant"};(()=>{var s,e;if((e=(s=l.value)==null?void 0:s.automation)!=null&&e.response_sequence){const r=l.value.automation.response_sequence.filter(o=>o==="Basic Replies"?!0:n(c[o]||o));Object.keys(c).forEach(o=>{const b=c[o];n(b)&&!r.includes(o)&&r.push(o)}),m.response_sequence=r}})();const _=async()=>{m.post("/settings/automation",{preserveScroll:!0})};return(s,e)=>(v(),y(x,{modules:a.modules},{default:h(()=>[t("div",N,[t("div",R,[t("div",C,[t("div",V,[t("div",$,[t("div",M,[t("div",j,[t("h4",E,i(s.$t("Response Sequence Priority")),1),t("span",D,i(s.$t("Choose the order in which the system searches for a matching response when replying to messages. Set the sequence for Basic Replies, Automated Flows, and AI Assistant to control how replies are prioritized.")),1),n("Flow builder")?(v(),k("div",O,i(s.$t("If a flow is already active for a contact, the response sequence will not be followed.")),1)):B("",!0)])]),t("div",null,[e[2]||(e[2]=t("span",{class:"mb-2 flex items-center text-slate-700"},[t("svg",{class:"mr-2",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 11v5m0 5a9 9 0 1 1 0-18a9 9 0 0 1 0 18Zm.05-13v.1h-.1V8h.1Z"})]),F(" Drag to reorder ")],-1)),I(w(S),{list:w(m).response_sequence,class:"mt-2",onEnd:e[0]||(e[0]=r=>_())},{item:h(({index:r,element:o})=>[t("div",T,[e[1]||(e[1]=t("span",null,[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[t("path",{fill:"currentColor",d:"M9 19.23q-.508 0-.87-.36q-.36-.362-.36-.87t.36-.87t.87-.36t.87.36q.36.362.36.87t-.36.87t-.87.36m6 0q-.508 0-.87-.36q-.36-.362-.36-.87t.36-.87t.87-.36t.87.36q.36.362.36.87t-.36.87t-.87.36m-6-6q-.508 0-.87-.36q-.36-.362-.36-.87t.36-.87t.87-.36t.87.36q.36.362.36.87t-.36.87t-.87.36m6 0q-.508 0-.87-.36q-.36-.362-.36-.87t.36-.87t.87-.36t.87.36q.36.362.36.87t-.36.87t-.87.36m-6-6q-.508 0-.87-.36q-.36-.362-.36-.87t.36-.87t.87-.36t.87.36q.36.362.36.87t-.36.87t-.87.36m6 0q-.508 0-.87-.36q-.36-.362-.36-.87t.36-.87t.87-.36t.87.36q.36.362.36.87t-.36.87t-.87.36"})])],-1)),t("span",null,i(o),1)])]),_:1},8,["list"])])])])])])])]),_:1},8,["modules"]))}};export{lt as default};