1import{r as h,j as e,bd as t,ay as me,n as We,aS as pa,o as de,p as pe,aP as oe,L as D,F as q,v as ce,ak as F,bw as Q,bP as ne,W as J,k5 as ua,a1 as W,a4 as $,d as he,bJ as ma,bK as ha,ev as ga,bU as _a,c as fa,bW as U,bS as be,dJ as aa,dK as ta,ao as sa,gf as ze,aU as ba,fB as xa,bk as _e,a9 as ke,ek as Ke,by as ja,aX as Ca}from"./index-BYjmYzu-.js";import{M as na}from"./modal_component-CgKrFsb7.js";import{u as M,b as X,c as ee,a as ie,f as ia}from"./utils-k_PfN3YJ.js";import{A as Ee}from"./index-BIU1IP9m.js";import{a as ya}from"./modal_header-su8lU-Gk.js";import{t as Ye,u as va}from"./index-ntXxdHkP.js";import{v as ye}from"./form_utils-BRD3em_d.js";import{C as A}from"./col-DSokC5oO.js";import{C as Ne}from"./index-ByjQY1tN.js";import{D as we}from"./index-Cy7Vl5oX.js";import{R as Na}from"./DownOutlined-CNOnAf1g.js";import{R as ue}from"./InfoCircleOutlined-DObI79rA.js";import{S as xe}from"./index-CSibPLgg.js";import{E as wa}from"./edit_agent_drawer-CHAJnO5a.js";import{S as Ze}from"./automation_content-CndxZ0rO.js";import{S as Ia}from"./PackageSmall-Cz2t3tKf.js";import{S as Ta}from"./InvoiceLine-_87NgkCt.js";import{w as Sa,b as Le}from"./index-Ck98gylS.js";import{V as ve}from"./utils-0rEeyWE7.js";import{b as Da}from"./vas_trial_utils-X20AYrox.js";import{g as Ae}from"./disable_tooltips-CFCTnA_K.js";import{d as ka,c as Fa,M as La,e as Ge}from"./constant-DemJVWh6.js";import{S as Ea}from"./CodCharges-D2FwFHTc.js";import{g as Oa,a as Be,v as Aa,b as Ba,P as Pa,i as Ma,A as Ra,D as qa,c as Va,d as $a,e as Ua}from"./cod_to_prepaid_utils-CI5NZkri.js";import{T as la,c as ra,V as Je}from"./vas_info-CKGXV6Ze.js";import{R as Ha}from"./EyeOutlined-Cm45kPpF.js";import"./index-BNQX9KrA.js";import"./DialogWrap-BcWh8mEF.js";import"./Portal-BnIU9h3K.js";import"./getScrollBarSize-BX5bDlpW.js";import"./useId-CCfbXMy0.js";import"./download-B_K3G676.js";import"./utils-BZTh1pv3.js";import"./react-number-format.es-HDPTMfGw.js";import"./dropdown-CVdns1v5.js";import"./Dropdown-Dy0ThnTD.js";import"./isNumeric-OYazz19Q.js";import"./LoadingOutlined-CBjTJf7a.js";import"./RightOutlined-nkDSTxE1.js";import"./index-CZNe-HiK.js";import"./CloseIcon-DqZkkrpQ.js";import"./constant-C4dI9lln.js";import"./PackageMedium-KH3dGcuL.js";import"./CartTrolley-Bh7kmKkA.js";import"./index-BT5g8ZbQ.js";import"./table_loader-1S6nfwbj.js";import"./index-DLOdFlM4.js";import"./mixpanel_utils-BIdpoJGP.js";import"./index-CneRmXqw.js";import"./PlusOutlined-ByZyTB3m.js";import"./Skeleton-DbxtqGSl.js";import"./index-D6c-D_1p.js";import"./WarningHeader-C1-CdYei.js";import"./WhatsAppLine-CXO5HBZO.js";import"./common_utils-apf5QVJD.js";import"./integrations_constants-CA4Ima8N.js";const Wa=i=>h.createElement("svg",{width:178,height:105,viewBox:"0 0 178 105",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i},h.createElement("path",{d:"M163.769 89.6766H17.7952C14.0405 89.6766 10.998 86.6342 10.998 82.8795V21.7972C10.998 18.0425 14.0405 15 17.7952 15H163.769C167.524 15 170.566 18.0425 170.566 21.7972V82.8795C170.566 86.6342 167.524 89.6766 163.769 89.6766Z",fill:"#B9BECE",fillOpacity:.13}),h.createElement("path",{d:"M159.786 77.0689L14.3844 89.9782C10.6444 90.3103 7.34482 87.5488 7.01276 83.8088L1.61088 22.9659C1.27883 19.2258 4.04026 15.9263 7.78028 15.5942L153.182 2.68484C156.922 2.35278 160.222 5.11425 160.554 8.85427L165.956 69.6972C166.288 73.4372 163.526 76.7368 159.786 77.0689Z",fill:"white"}),h.createElement("path",{d:"M7.85756 16.4677L153.259 3.55839C156.517 3.26917 159.391 5.67395 159.68 8.9315L165.082 69.7752C165.371 73.0327 162.966 75.9063 159.708 76.1955L14.3066 89.1049C11.0491 89.3939 8.17576 86.9891 7.88632 83.7317L2.48437 22.888C2.19532 19.6305 4.60011 16.7571 7.85756 16.4677Z",stroke:"#B9BECE",strokeOpacity:.4,strokeWidth:1.7535}),h.createElement("path",{d:"M129.826 21.3303L35.9609 29.6641L36.4907 35.6311L130.356 27.2973L129.826 21.3303Z",fill:"#B9BECE"}),h.createElement("path",{d:"M143.197 39.1527L21.6367 49.9453L22.1665 55.9123L143.727 45.1197L143.197 39.1527Z",fill:"#B9BECE",fillOpacity:.44}),h.createElement("path",{d:"M83.1247 60.4862L23.0449 65.8203L23.5747 71.7873L83.6545 66.4532L83.1247 60.4862Z",fill:"#B9BECE",fillOpacity:.44}),h.createElement("path",{d:"M28.4281 33.341C28.6292 35.6061 26.9568 37.6043 24.6917 37.8054C22.4267 38.0065 20.4284 36.3342 20.2273 34.0691C20.0262 31.8041 21.6986 29.8058 23.9636 29.6047C26.2289 29.4058 28.2272 31.0782 28.4281 33.341Z",fill:"#B9BECE"})),za="_container_pm8te_10",Ka="_image_pm8te_16",Ya="_title_pm8te_19",Za="_description_pm8te_25",Se={container:za,image:Ka,title:Ya,description:Za},Ga=()=>e.jsxs(t,{className:Se.container,justify:"center",align:"center",vertical:!0,gap:32,children:[e.jsx(Wa,{className:Se.image}),e.jsxs(t,{vertical:!0,gap:10,align:"center",children:[e.jsx("p",{className:Se.title,children:"Automation not Active"}),e.jsx("p",{className:Se.description,children:"Enable the automation and let the workflow take care of Order Confirmation/NDR Management"})]})]}),Ja="_container_bjy1m_10",Qa="_img_bjy1m_17",Xa="_sidebar_bjy1m_21",et="_templateItem_bjy1m_25",at="_active_bjy1m_34",tt="_templateName_bjy1m_39",st="_activeIndicator_bjy1m_49",le={container:Ja,img:Qa,sidebar:Xa,templateItem:et,active:at,templateName:tt,activeIndicator:st},De=[{id:"customer_not_available",label:"Customer Not Available",asset:"shipping_automation_whatsapp_ndr_v2.svg"},{id:"customer_refused_to_accept",label:"Customer Refused to Accept",asset:"shipping_automation_whatsapp_ndr_v3.svg"},{id:"otp_verified_cancellation",label:"OTP-Verified Cancellation",asset:"shipping_automation_whatsapp_ndr_v3.svg"},{id:"others",label:"Other",asset:"shipping_automation_whatsapp_ndr.svg"}],nt=({onClose:i})=>{const{query:o}=me(),a=o.current_tab==="order",s=a?"Order Confirmation":"NDR Management",[c,u]=h.useState(De[0].id),g=De.find(l=>l.id===c)||De[0],r=a?We("shipping_automation_whatsapp_order_v2.svg"):We(g.asset),m=a?s:g.label;return e.jsx(na,{onClose:i,title:"Preview",description:s,width:a?"small":"medium",children:e.jsxs(t,{children:[!a&&e.jsx(t,{vertical:!0,className:le.sidebar,children:De.map(l=>e.jsxs("div",{className:`${le.templateItem} ${c===l.id?le.active:""}`,onClick:()=>u(l.id),children:[c===l.id&&e.jsx("div",{className:le.activeIndicator}),e.jsx("span",{className:le.templateName,children:l.label})]},l.id))}),e.jsx(t,{vertical:!0,gap:10,className:le.container,align:"center",justify:"center",children:e.jsx("img",{src:r,className:le.img,alt:m,loading:"lazy"},r)})]})})},it="_headerContainer_gogx4_10",lt="_headerTitle_gogx4_14",rt="_container_gogx4_23",ot="_formTitle_gogx4_31",ct="_divider_gogx4_59",dt="_labeledInput_gogx4_69",pt="_submitButtonContainer_gogx4_76",ut="_formRow_gogx4_86",I={headerContainer:it,headerTitle:lt,container:rt,formTitle:ot,divider:ct,labeledInput
1:dt,submitButtonContainer:pt,formRow:ut},mt=[{label:"COD",value:"cod"},{label:"Prepaid",value:"prepaid"}],ht=({onClose:i,isIvrCalling:o})=>{var C,p;const[a,s]=h.useState(!1),{shipfastProfile:c}=pa(),{isOrderTab:u,currentAutomation:g}=M(),r=h.useRef(null),m=h.useRef(null),l=((C=c==null?void 0:c.attributes)==null?void 0:C.phone_number)||"",v=((p=c==null?void 0:c.attributes)==null?void 0:p.name)||"",T={phone:l,product:"Wireless Headphones",address:"123 Main Street, Apartment 4B, Bangalore, Karnataka, 560001",company_name:v||"TechStore",quantity:"2",order_value:"2999",customer_email:"[email protected]",product_details:"Wireless Headphones with Noise Cancellation",payment_method:"cod"},N={phone:l,product_name:"Wireless Headphones",address1:"123 Main Street, Apartment 4B",address2:"Near City Mall, Koramangala",ndr_reason:"courier_delay",company_name:v||"TechStore",logistics_service:"Express Delivery"},b=async d=>{s(!0);const _={product:d.product,product_and_quantity:`${d.product} - ${d.quantity}`,customer_address:d.address,company_name:d.company_name,total_price:d.order_value,order_value:d.order_value,address:d.address,customer_email:d.customer_email,product_details:d.product_details,payment_method:d.payment_method},{ok:x,data:S}=await Ye({automationId:(g==null?void 0:g.id)||"",phone:d.phone,callVariables:_});if(s(!1),!x){W((S==null?void 0:S.error)||"Failed to trigger demo call");return}$("Demo call triggered successfully! You will receive a call shortly."),i()},f=async d=>{s(!0);const _={product_name:d.product_name,address1:d.address1,address2:d.address2,ndr_reason:d.ndr_reason,company_name:d.company_name,logistics_service:d.logistics_service},{ok:x,data:S}=await Ye({automationId:(g==null?void 0:g.id)||"",phone:d.phone,callVariables:_});if(s(!1),!x){W((S==null?void 0:S.error)||"Failed to trigger demo call");return}$("Demo call triggered successfully! You will receive a call shortly."),i()};return e.jsx(na,{onClose:i,title:`Try ${o?"IVR":"AI"} Call Demo`,fluidHeight:!0,width:"medium",Header:()=>e.jsxs(t,{className:I.headerContainer,align:"center",justify:"space-between",children:[e.jsx(t,{vertical:!0,gap:4,children:e.jsxs("p",{className:I.headerTitle,children:["Try ",o?"IVR":"AI"," Call Demo"]})}),e.jsx(ya,{onClose:i})]}),children:u?e.jsx(de,{innerRef:r,initialValues:T,onSubmit:b,children:e.jsxs(pe,{className:I.container,children:[e.jsx("h3",{className:I.formTitle,children:"Your Phone Number"}),e.jsx(oe,{gutter:[16,16],align:"top",children:e.jsx(A,{span:24,children:e.jsx(D,{label:"Phone Number",component:q,wrapperClassName:F(I.labeledInput),name:"phone",required:!0,placeholder:"Enter your phone number",validate:ye([{test:ce.required,message:"Phone number is required"},{test:ce.phoneNumber,message:"Please enter a valid phone number"}])})})}),e.jsx(Q,{className:I.divider}),e.jsx("h3",{className:I.formTitle,children:"Order Details"}),e.jsxs(oe,{gutter:[16,16],align:"top",className:I.formRow,children:[e.jsx(A,{span:12,children:e.jsx(D,{label:"Product",component:q,wrapperClassName:F(I.labeledInput),name:"product",placeholder:"Enter product name",required:!0})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"Quantity",component:q,wrapperClassName:F(I.labeledInput),name:"quantity",placeholder:"Enter quantity",required:!0})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"Company Name",component:q,wrapperClassName:F(I.labeledInput),name:"company_name",placeholder:"Enter company name",required:!0})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"Order Value",component:q,wrapperClassName:F(I.labeledInput),name:"order_value",placeholder:"Enter order value",required:!0})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"Payment Method",component:ne,wrapperClassName:F(I.labeledInput),name:"payment_method",options:mt,style:{width:"100%"},required:!0})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"Customer Email",component:q,wrapperClassName:F(I.labeledInput),name:"customer_email",placeholder:"Enter customer email",required:!0})}),e.jsx(A,{span:24,children:e.jsx(D,{label:"Delivery Address",component:q,wrapperClassName:F(I.labeledInput),name:"address",placeholder:"Enter delivery address",required:!0})}),e.jsx(A,{span:24,children:e.jsx(D,{label:"Product Details",component:q,wrapperClassName:F(I.labeledInput),name:"product_details",placeholder:"Enter product details",required:!0})})]}),e.jsxs(t,{justify:"flex-end",gap:12,className:I.submitButtonContainer,children:[e.jsx(J,{type:"default",onClick:i,disabled:a,children:"CANCEL"}),e.jsx(J,{type:"primary",onClick:()=>{var d;
1return(d=r.current)==null?void 0:d.submitForm()},loading:a,children:"CALL ME"})]})]})}):e.jsx(de,{innerRef:m,initialValues:N,onSubmit:f,enableReinitialize:!0,children:e.jsxs(pe,{className:I.container,children:[e.jsx("h3",{className:I.formTitle,children:"Your Phone Number"}),e.jsx(oe,{gutter:[16,16],align:"top",children:e.jsx(A,{span:24,children:e.jsx(D,{label:"Phone Number",component:q,wrapperClassName:F(I.labeledInput),name:"phone",required:!0,placeholder:"Enter your phone number",validate:ye([{test:ce.required,message:"Phone number is required"},{test:ce.phoneNumber,message:"Please enter a valid phone number"}])})})}),e.jsx(Q,{className:I.divider}),e.jsx("h3",{className:I.formTitle,children:"NDR Details"}),e.jsxs(oe,{gutter:[16,16],align:"top",className:I.formRow,children:[e.jsx(A,{span:12,children:e.jsx(D,{label:"Product Name",component:q,wrapperClassName:F(I.labeledInput),name:"product_name",placeholder:"Enter product name",required:!0})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"Company Name",component:q,wrapperClassName:F(I.labeledInput),name:"company_name",placeholder:"Enter company name",required:!0})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"NDR Reason",component:ne,wrapperClassName:F(I.labeledInput),style:{width:"100%"},name:"ndr_reason",options:ua,required:!0})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"Logistics Service",component:q,wrapperClassName:F(I.labeledInput),name:"logistics_service",placeholder:"Enter logistics service",required:!0})}),e.jsx(A,{span:24,children:e.jsx(D,{label:"Address Line 1",component:q,wrapperClassName:F(I.labeledInput),name:"address1",placeholder:"Enter address line 1",required:!0})}),e.jsx(A,{span:24,children:e.jsx(D,{label:"Address Line 2",component:q,wrapperClassName:F(I.labeledInput),name:"address2",placeholder:"Enter address line 2",required:!0})})]}),e.jsxs(t,{justify:"flex-end",gap:12,className:I.submitButtonContainer,children:[e.jsx(J,{type:"default",onClick:i,disabled:a,children:"CANCEL"}),e.jsx(J,{type:"primary",onClick:()=>{var d;return(d=m.current)==null?void 0:d.submitForm()},loading:a,children:"CALL ME"})]})]})})})},gt="_labeledInput_qgmjc_10",_t="_select_qgmjc_19",ft="_cancelButton_qgmjc_33",bt="_saveButton_qgmjc_39",xt="_customLabel_qgmjc_43",jt="_tagsContainer_qgmjc_46",Ct="_tagsTag_qgmjc_49",yt="_tagsLoaderContainer_qgmjc_57",vt="_infoIcon_qgmjc_60",K={labeledInput:gt,select:_t,cancelButton:ft,saveButton:bt,customLabel:xt,tagsContainer:jt,tagsTag:Ct,tagsLoaderContainer:yt,infoIcon:vt},Nt=({onClose:i})=>{var L,R,w,k;const{isShipfastChildUser:o}=he(),{reloadAutomations:a}=X(),{currentAutomation:s,isOrderTab:c}=M(),[u,g]=h.useState(!1),[r,m]=h.useState(""),{tags:l,isLoading:v}=ma({searchTerm:r}),T=((L=s==null?void 0:s.attributes.config.order_type)==null?void 0:L.exclude_tags)||[],[N,b]=h.useState(T),f=h.useRef(null),C=[{label:"COD",value:"cod"},{label:"Prepaid",value:"prepaid"}],p=s==null?void 0:s.attributes.config.order_type,d={order_type:[...p!=null&&p.is_cod?["cod"]:[],...p!=null&&p.is_prepaid?["prepaid"]:[]],exclude_tags:void 0,sync_ai_agent_tags:!!((k=(w=(R=s==null?void 0:s.attributes)==null?void 0:R.config)==null?void 0:w.create_ai_outcome_tags)!=null&&k.enabled)},_=async y=>{const j=y==null?void 0:y.order_type,ae={automation:{enabled:!0,config:{...s==null?void 0:s.attributes.config,order_type:{...s==null?void 0:s.attributes.config.order_type,is_cod:j.includes("cod"),is_prepaid:j.includes("prepaid"),...c?{exclude_tags:N}:{}},create_ai_outcome_tags:{enabled:y.sync_ai_agent_tags}}}};g(!0);const{ok:Z,data:G}=await ee({automationId:(s==null?void 0:s.id)||"",updatedData:ae});if(g(!1),!Z){W((G==null?void 0:G.error)||"Failed to update order type");return}await a(),$((G==null?void 0:G.message)||"Order type updated successfully"),i()},x=ha(y=>{m(y)},500),S=(y,j)=>{var ae,Z;return((ae=j.skuId)==null?void 0:ae.toLowerCase().indexOf(y==null?void 0:y.toLowerCase()))>=0||((Z=j.label)==null?void 0:Z.toLowerCase().indexOf(y==null?void 0:y.toLowerCase()))>=0};return e.jsx(Ne,{header:e.jsx(we,{headerTitle:"Edit Order Type",onClose:i}),onClose:i,footer:e.jsxs(t,{justify:"flex-end",gap:10,children:[e.jsx(be,{size:"small",type:"link",className:K.cancelButton,onClick:i,children:"CANCEL"}),e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:o?"You donât have permission to make changes. Please contact your admin.":"",children:e.jsx("div",{children:e.jsx(J,{size:"small",disabled:u||o,className:K.saveButton,loading:u,onClick:()=>{var y;
1return(y=f.current)==null?void 0:y.submitForm()},children:"SAVE"})})})]}),width:500,open:!0,children:e.jsx(de,{initialValues:d,onSubmit:_,innerRef:f,children:({values:y,setFieldValue:j})=>{const[ae,Z]=h.useState(l.map(E=>({label:E,value:E,disabled:N.includes(E)}))),G=!!y.sync_ai_agent_tags;return h.useEffect(()=>{v||Z(l.map(E=>({label:E,value:E,disabled:N.includes(E)})))},[N,l,v]),e.jsxs(pe,{children:[e.jsx(D,{component:ga,required:!0,label:"Order Type(s)",name:"order_type",placeholder:"Select order types",options:C,wrapperClassName:F(K.labeledInput,K.select),suffixIcon:e.jsx(Na,{}),validate:ye([{test:ce.required,message:"Order type is required"}])}),c&&e.jsxs(t,{vertical:!0,gap:4,children:[e.jsxs(t,{vertical:!0,gap:8,children:[e.jsx("p",{className:K.customLabel,children:`Exclude Orders with Tags (${N.length})`}),N.length>0&&e.jsx(t,{gap:4,className:K.tagsContainer,children:N.map((E,Ce)=>e.jsx(_a,{closable:!0,className:K.tagsTag,onClose:()=>{b(Te=>Te.filter(ge=>ge!==E))},children:E},`${E}-${Ce}`))})]}),e.jsx(D,{component:ne,options:ae,showSearch:!0,onSearch:E=>x(E),name:"exclude_tags",filterOption:S,label:"",loading:v,placeholder:"Search Tag",wrapperClassName:F(K.labeledInput,K.select),onChange:async E=>{b(Ce=>[...Ce,E]),await j("exclude_tags",null)},onSelect:async E=>{await j("exclude_tags",null)},dropdownRender:E=>e.jsxs(e.Fragment,{children:[E,v&&e.jsx(t,{justify:"center",align:"center",className:K.tagsLoaderContainer,children:e.jsx(fa,{size:"small",showText:!1})})]})})]}),e.jsxs(t,{justify:"space-between",align:"center",children:[e.jsxs(t,{align:"center",gap:6,children:[e.jsx("p",{className:K.customLabel,children:"Sync AI Agent Tags"}),e.jsx(U,{title:"When toggled on outcomes of AI agents would be added as a tag on Orders",color:"#FFFFFF",placement:"bottom",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsx(ue,{className:K.infoIcon})})]}),e.jsx(xe,{checked:G,onChange:E=>j("sync_ai_agent_tags",E),checkedChildren:"On",unCheckedChildren:"Off"})]})]})}})})},wt="_cancelButton_1ea8h_10",It="_saveButton_1ea8h_16",Tt="_sectionTitle_1ea8h_24",St="_sectionSubTitle_1ea8h_29",P={cancelButton:wt,saveButton:It,sectionTitle:Tt,sectionSubTitle:St},Qe=({checked:i,onChange:o,disabled:a,disableTooltip:s}
1)=>e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:a?s:"",children:e.jsx(xe,{checked:i,onChange:o,checkedChildren:"On",unCheckedChildren:"Off",disabled:a})}),Dt=({onClose:i})=>{var p,d,_,x,S;const{isShipfastChildUser:o}=he(),{reloadAutomations:a}=X(),{currentAutomation:s,isEditable:c}=M(),u=ie(),g=h.useRef(null),r=((_=(d=(p=s==null?void 0:s.attributes)==null?void 0:p.config)==null?void 0:d.whatsapp_automation)==null?void 0:_.retry_enabled)||!1,[m,l]=h.useState(r),[v,T]=h.useState(!1),N=((x=s==null?void 0:s.attributes.config.whatsapp_automation)==null?void 0:x.update_address)||!1,[b,f]=h.useState(N),C=async()=>{var k;const L={automation:{enabled:!0,config:{...s==null?void 0:s.attributes.config,whatsapp_automation:{...s==null?void 0:s.attributes.config.whatsapp_automation,update_address:b,retry_enabled:m,...!!m&&{retry_count:(k=g.current)==null?void 0:k.values.retry_count}}}}};T(!0);const{ok:R,data:w}=await ee({automationId:(s==null?void 0:s.id)||"",updatedData:L});if(T(!1),!R){W((w==null?void 0:w.error)||"Failed to update order type");return}await a(),$((w==null?void 0:w.message)||"Order type updated successfully"),i()};return e.jsx(Ne,{header:e.jsx(we,{headerTitle:"Edit WhatsApp Order Confirmation",onClose:i}),onClose:i,footer:e.jsxs(t,{justify:"flex-end",gap:10,children:[e.jsx(be,{size:"small",type:"link",className:P.cancelButton,onClick:i,children:"CANCEL"}),e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:o||!c?u:"",children:e.jsx("div",{children:e.jsx(J,{size:"small",disabled:v||o||!c,className:P.saveButton,loading:v,onClick:()=>{var L;return(L=g.current)==null?void 0:L.submitForm()},children:"SAVE"})})})]}),width:500,open:!0,children:e.jsx(de,{initialValues:{retry_count:((S=s==null?void 0:s.attributes.config.whatsapp_automation)==null?void 0:S.retry_count)||0},onSubmit:C,innerRef:g,children:e.jsx(pe,{children:e.jsxs(t,{vertical:!0,gap:24,children:[e.jsxs(t,{justify:"space-between",gap:20,children:[e.jsx("p",{className:P.sectionTitle,children:"Enable auto address update"}),e.jsx(Qe,{checked:b,onChange:f,disabled:!c,disableTooltip:u})]}),e.jsxs(t,{vertical:!0,gap:8,children:[e.jsxs(t,{align:"center",justify:"space-between",gap:16,children:[e.jsx("p",{className:P.sectionTitle,children:"Enable Auto Retry"}),e.jsx(Qe,{checked:!!m,onChange:l,disabled:!c,disableTooltip:u})]}),e.jsx(oe,{gutter:26,children:e.jsx(A,{span:12,children:e.jsx(aa,{name:"retry_count",validate:ye([...m?[{test:ce.required,message:"Retry count is required"}]:[]]),disabled:!m||!c,children:({form:L})=>{const{touched:R,errors:w}=L,k=R.retry_count&&w.retry_count,y=k&&m;return e.jsxs(t,{vertical:!0,gap:4,children:[e.jsx("p",{className:P.sectionSubTitle,children:"Retry Count"}),e.jsx(ta,{defaultValue:0,min:0,max:3,size:"small",className:F(P.retryCountContainer,{[P.errorBorder]:y}),disabled:!m||!c,required:!0,value:L.values.retry_count,onChange:j=>{L.setFieldValue("retry_count",j)}}),y&&e.jsxs("p",{className:P.errorMessage,children:[e.jsx(sa,{}),k]})]})}})})})]})]})})})})},kt="_labeledInput_1gp02_10",Ft="_cancelButton_1gp02_33",Lt="_saveButton_1gp02_39",Et="_prefixText_1gp02_79",Ot="_intervalText_1gp02_84",re={labeledInput:kt,cancelButton:Ft,saveButton:Lt,prefixText:Et,intervalText:Ot},At=({onClose:i,isThirdStep:o})=>{const{currentAutomation:a,isEditable:s}=M(),c=ie(),{reloadAutomations:u}=X(),[g,r]=h.useState(!1),m=h.useRef(null),{isShipfastChildUser:l}=he(),v=a==null?void 0:a.id,T=o?a==null?void 0:a.attributes.config.ai_calling_automation.wait_time:a==null?void 0:a.attributes.config.ops_calling_automation.wait_time,N=o?"Note: This delay will be applied before the next step (AI Call).":"Note: This delay will be applied before the next step (Manual Ops Call).",b=async(_,x)=>{const S=_.hours*60+_.minutes,L=o?{ai_calling_automation:{...a==null?void 0:a.attributes.config.ai_calling_automation,wait_time:S}}:{ops_calling_automation:{...a==null?void 0:a.attributes.config.ops_calling_automation,wait_time:S}},R={automation:{enabled:!0,config:{...a==null?void 0:a.attributes.config,...L}}};r(!0);const{ok:w,data:k}=await ee({automationId:v||"",updatedData:R});if(r(!1),!w){W((k==null?void 0:k.error)||"Failed to update interval");return}$("Interval updated successfully"),u(),i()},f=Math.floor(parseInt(T||"0")/60),C=parseInt(T||"0")%60,p=Array.from({length:60},(_,x)=>x).map(_=>({label:_,value:_})),d=Array.from({length:3},(_,x)=>x).map(_=>({label:_,value:_}));return e.jsx(Ne,{header:e.jsx(we,{headerTitle:"Edit Interval",subTitle:N,onClose:i}),onClose:i,footer:e.jsxs(t,{justify:"flex-end",gap:10,children:[e.jsx(be,{size:"small",type:"link",className:re.cancelButton,onClick:i,children:"CANCEL"}),e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:l||!s?c:"",children:e.jsx("div",{children:e.jsx(J,{size:"small",disabled:g||l||!s,className:re.saveButton,loading:g,onClick:()=>{var _;
1return(_=m.current)==null?void 0:_.submitForm()},children:"SAVE"})})})]}),width:500,open:!0,children:e.jsx(de,{initialValues:{hours:f,minutes:C},validate:_=>{const x={};return _.hours<1&&_.minutes<30&&(x.minutes="Time must equal or greater than 30 minutes"),x},onSubmit:b,innerRef:m,children:e.jsxs(pe,{children:[e.jsx("p",{className:re.intervalText,children:"Interval"}),e.jsxs(oe,{gutter:[16,16],align:"top",children:[e.jsx(A,{span:12,children:e.jsx(D,{label:"",component:ne,prefix:e.jsx("p",{className:re.prefixText,children:"Hours"}),options:d,wrapperClassName:F(re.labeledInput),name:"hours"})}),e.jsx(A,{span:12,children:e.jsx(D,{label:"",component:ne,prefix:e.jsx("p",{className:re.prefixText,children:"Minutes"}),wrapperClassName:F(re.labeledInput),name:"minutes",options:p})})]})]})})})},Bt=i=>h.createElement("svg",{width:13,height:15,viewBox:"0 0 13 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i},h.createElement("path",{d:"M0.875 0V1.25H2.125V3.75C2.12575 4.50569 2.32222 5.2483 2.69528 5.90548C3.06834 6.56266 3.60527 7.11201 4.25375 7.5C3.60527 7.88799 3.06834 8.43734 2.69528 9.09452C2.32222 9.7517 2.12575 10.4943 2.125 11.25V13.75H0.875V15H12.125V13.75H10.875V11.25C10.8743 10.4943 10.6778 9.7517 10.3047 9.09452C9.93165 8.43734 9.39473 7.88799 8.74625 7.5C9.39473 7.11201 9.93165 6.56266 10.3047 5.90548C10.6778 5.2483 10.8743 4.50569 10.875 3.75V1.25H12.125V0H0.875ZM3.375 1.25H9.625V3.75C9.625 5.48313 8.23313 6.875 6.5 6.875C4.76688 6.875 3.375 5.48313 3.375 3.75V1.25ZM4 2.5V3.75C4 5.13125 5.11875 6.25 6.5 6.25C7.88125 6.25 9 5.13125 9 3.75V2.5H4ZM6.5 8.125C8.23313 8.125 9.625 9.51688 9.625 11.25V13.75H3.375V11.25C3.375 9.51688 4.76688 8.125 6.5 8.125Z",fill:"#808699"})),oa=async({isOrderTab:i,vasSubscriptions:o})=>{const a=i?ve.AUTOMATION_ORDER_CONFIRMATION:ve.AUTOMATION_NDR_MANAGEMENT,s=o.find(g=>g.attributes.service===a);if(!s)return{ok:!0};const c=s.attributes.is_free_trial_active||!1;return(c?s.attributes.free_trial_status:s.attributes.is_active)?Sa({vasPricingId:s.id,updatedData:{vas_subscription:Da({is_free_trial_active:c},!1)}}):{ok:!0}},Pt=({onClose:i})=>{var v,T,N,b;const{reloadAutomations:o}=X(),{currentAutomation:a}=M(),s=h.useRef(null),c=((N=(T=(v=a==null?void 0:a.attributes)==null?void 0:v.config)==null?void 0:T.whatsapp_automation)==null?void 0:N.retry_enabled)||!1,[u,g]=h.useState(c),[r,m]=h.useState(!1),l=async()=>{var d;const f={automation:{enabled:!0,config:{...a==null?void 0:a.attributes.config,whatsapp_automation:{...a==null?void 0:a.attributes.config.whatsapp_automation,retry_enabled:u,...!!u&&{retry_count:(d=s.current)==null?void 0:d.values.retry_count}}}}};m(!0);const{ok:C,data:p}=await ee({automationId:(a==null?void 0:a.id)||"",updatedData:f});if(m(!1),!C){W((p==null?void 0:p.error)||"Failed to update order type");return}await o(),$((p==null?void 0:p.message)||"Order type updated successfully"),i()};return e.jsx(Ne,{header:e.jsx(we,{headerTitle:"Edit WhatsApp Order Confirmation",onClose:i}),onClose:i,footer:e.jsxs(t,{justify:"flex-end",gap:10,children:[e.jsx(be,{size:"small",type:"link",className:P.cancelButton,onClick:i,children:"CANCEL"}),e.jsx(J,{size:"small",disabled:r,className:P.saveButton,loading:r,onClick:()=>{var f;return(f=s.current)==null?void 0:f.submitForm()},children:"SAVE"})]}),width:500,open:!0,children:e.jsx(de,{initialValues:{retry_count:((b=a==null?void 0:a.attributes.config.whatsapp_automation)==null?void 0:b.retry_count)||0},onSubmit:l,innerRef:s,children:e.jsx(pe,{children:e.jsxs(t,{vertical:!0,gap:8,children:[e.jsxs(t,{align:"center",justify:"space-between",gap:16,children:[e.jsx("p",{className:P.sectionTitle,children:"Enable Auto Retry"}),e.jsx(xe,{checked:u,checkedChildren:"On",unCheckedChildren:"Off",onChange:f=>{g(f)}})]}),e.jsx(oe,{gutter:26,children:e.jsx(A,{span:12,children:e.jsx(aa,{name:"retry_count",validate:ye([...u?[{test:ce.required,message:"Retry count is required"}]:[]]),disabled:!u,children:({form:f})=>{const{touched:C,errors:p}=f,d=C.retry_count&&p.retry_count,_=d&&u;return e.jsxs(t,{vertical:!0,gap:4,children:[e.jsx("p",{className:P.sectionSubTitle,children:"Retry Count"}),e.jsx(ta,{defaultValue:0,min:0,max:3,size:"small",className:F(P.retryCountContainer,{[P.errorBorder]:_}),disabled:!u,required:!0,value:f.values.retry_count,onChange:x=>{f.setFieldValue("retry_count",x)}}),_&&e.jsxs("p",{className:P.errorMessage,children:[e.jsx(sa,{}),d]})]})}})})})]})})})})},Mt="_noteContainer_iacjr_10",Rt="_noteIcon_iacjr_16",qt="_noteText_iacjr_21",Oe={noteContainer:Mt,noteIcon:Rt,noteText:qt},Vt=({className:i})=>{var u,g,r;const{vasSubscriptions:o,isLoading:a}=Le();if(a&&!o.length)return null;const s=(r=(g=(u=o.find(m=>m.attributes.service===ve.EARLY_COD))==null?void 0:u.attributes)==null?void 0:g.price)==null?void 0:r.price,c=Oa(s);
1return c?e.jsxs(t,{align:"flex-start",gap:6,className:[Oe.noteContainer,i].filter(Boolean).join(" "),children:[e.jsx(ue,{className:Oe.noteIcon,"aria-hidden":"true"}),e.jsxs("p",{className:Oe.noteText,children:["Note: ",c]})]}):null},$t="_cancelButton_ahf7g_10",Ut="_saveButton_ahf7g_16",Ht="_labeledInput_ahf7g_20",Wt="_select_ahf7g_26",zt="_input_ahf7g_40",Kt="_discountLabel_ahf7g_43",Yt="_infoIcon_ahf7g_48",Zt="_infoMessageContainer_ahf7g_53",Gt="_infoMessageIcon_ahf7g_58",Jt="_infoMessageText_ahf7g_62",V={cancelButton:$t,saveButton:Ut,labeledInput:Ht,select:Wt,input:zt,discountLabel:Kt,infoIcon:Yt,infoMessageContainer:Zt,infoMessageIcon:Gt,infoMessageText:Jt},Qt=["partial_amount_value","discount_value"],Xt=({values:i,errors:o,isValid:a,loading:s,isShipfastChildUser:c,isEditable:u,disableTooltip:g,onClose:r,setFieldTouched:m,setFieldValue:l,submitForm:v})=>{h.useEffect(()=>{Qt.forEach(p=>{o[p]&&m(p,!0,!1)})},[o.partial_amount_value,o.discount_value,m]);const T=Ba(i),N=Va(T),b=c||!u,f=s||b||!a,C=s?"":b?g:a?"":"Please fix the highlighted errors before saving";return e.jsx(Ne,{open:!0,onClose:r,header:e.jsx(we,{headerTitle:"Convert COD to Prepaid",onClose:r}),footer:e.jsxs(t,{justify:"flex-end",gap:10,children:[e.jsx(be,{size:"small",type:"link",className:V.cancelButton,onClick:r,children:"CANCEL"}),e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:C,children:e.jsx("span",{children:e.jsx(J,{size:"small",className:V.saveButton,loading:s,disabled:f,onClick:()=>v(),children:"SAVE"})})})]}),children:e.jsx(pe,{children:e.jsxs(t,{vertical:!0,gap:16,children:[e.jsx(D,{component:ne,name:"payment_type",label:"Select Prepaid Type",placeholder:"Select prepaid type",options:[...Pa],className:V.select}),Ma(i.payment_type)&&e.jsxs(e.Fragment,{children:[e.jsx(D,{component:ne,name:"partial_amount_type",label:"Select Type for collectable amount",placeholder:"Select amount type",options:[...Ra],className:V.select}),e.jsx(D,{component:ze,required:!0,name:"partial_amount_value",label:i.partial_amount_type==="percentage"?"Enter Percentage for collectable amount":"Enter Collectable Amount",min:0,placeholder:i.partial_amount_type==="percentage"?"Enter percentage":"Enter amount",addonAfter:i.partial_amount_type==="percentage"?"%":"â¹",wrapperClassName:V.labeledInput,className:V.input,onChange:()=>m("partial_amount_value",!0,!1)})]}),e.jsx(D,{component:ne,name:"discount_type",label:"Discount Type (Optional)",placeholder:"Select discount type",options:[...qa],className:V.select}),e.jsx(D,{component:ze,name:"discount_value",min:0,label:e.jsxs("span",{className:V.discountLabel,children:["Discount Value",e.jsx(U,{title:"Optional discount applied when converting COD orders to prepaid",color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsx(ue,{className:V.infoIcon})})]}),placeholder:"Enter discount value",addonAfter:i.discount_type==="percentage"?"%":"â¹",wrapperClassName:V.labeledInput,className:V.input,onChange:()=>m("discount_value",!0,!1)}),e.jsxs(t,{align:"flex-start",gap:6,className:V.infoMessageContainer,children:[e.jsx(ue,{className:V.infoMessageIcon}),e.jsxs("p",{className:V.infoMessageText,children:["Note: ",N]})]}),e.jsx(Vt,{})]})})})},es=({onClose:i})=>{const{isShipfastChildUser:o}=he(),{reloadAutomations:a}=X(),{currentAutomation:s,isEditable:c}=M(),u=ie(),[g,r]=h.useState(!1),m=h.useRef(null),l=Be(s==null?void 0:s.attributes.config.cod_to_prepaid_automation),v=async T=>{r(!0);const{ok:N,data:b}=await ee({automationId:(s==null?void 0:s.id)||"",updatedData:{automation:{enabled:!0,config:{...s==null?void 0:s.attributes.config,cod_to_prepaid_automation:{...l,...T}}}}});if(r(!1),!N){W((b==null?void 0:b.error)||"Failed to update COD to Prepaid settings");return}await a(),$((b==null?void 0:b.message)||"COD to Prepaid settings updated successfully"),i()};return e.jsx(de,{innerRef:m,enableReinitialize:!0,initialValues:l,validate:Aa,validateOnMount:!0,validateOnChange:!0,onSubmit:v,children:({values:T,errors:N,isValid:b,setFieldTouched:f,setFieldValue:C,submitForm:p})=>e.jsx(Xt,{values:T,errors:N,isValid:b,loading:g,isShipfastChildUser:o,isEditable:c,disableTooltip:u,onClose:i,setFieldTouched:f,setFieldValue:C,submitForm:p})})},as="_container_94r2q_10",ts="_tagContainer_94r2q_19",ss="_tagLabel_94r2q_24",ns="_itemIndex_94r2q_29",is="_itemLabel_94r2q_34",ls="_itemIconContainer_94r2q_39",rs="_whatsappStepHeader_94r2q_49",os="_whatsappIconContainer_94r2q_55",cs="_orderTypeStepHeader_94r2q_67",ds="_orderTypeIconContainer_94r2q_73",ps="_divider_94r2q_85",us="_verticalDivider_94r2q_89",ms="_descriptionLabel_94r2q_94",hs="_descriptionValue_94r2q_100",g
1s="_editIcon_94r2q_105",_s="_fallbackStepHeader_94r2q_110",fs="_fallbackIconContainer_94r2q_116",bs="_codToPrepaidConfigWrapper_94r2q_146",xs="_orderTypeBranchRow_94r2q_149",js="_orderTypeBranchMainColumn_94r2q_153",Cs="_orderTypeBranchColumn_94r2q_158",ys="_orderTypeBranchArrow_94r2q_163",vs="_codToPrepaidStepHeader_94r2q_167",Ns="_codToPrepaidIconContainer_94r2q_173",ws="_infoIcon_94r2q_186",Is="_arrowDot_94r2q_190",Ts="_dashedLine_94r2q_197",Ss="_arrowRight_94r2q_204",Ds="_dashedLineVertical_94r2q_211",ks="_arrowDown_94r2q_218",Fs="_multilingualSparkleIcon_94r2q_225",Ls="_fallbackBox_94r2q_283",Es="_fallbackContent_94r2q_293",Os="_fallbackContentSelected_94r2q_303",As="_recommendedAiFallbackContent_94r2q_307",Bs="_fallbackContentFullWidth_94r2q_310",Ps="_ivrFallbackContent_94r2q_313",Ms="_fallbackDemoLabel_94r2q_364",Rs="_demoRow_94r2q_373",qs="_multilingualDemoInlinePill_94r2q_379",Vs="_multilingualDemoPlayerInline_94r2q_387",$s="_multilingualDemoDividerInline_94r2q_406",Us="_multilingualDemoInlineLabel_94r2q_411",Hs="_fallbackTryAiCallButton_94r2q_418",Ws="_fallbackAiCallDescription_94r2q_453",zs="_fallbackAiCallLabel_94r2q_461",Ks="_callOptionHeader_94r2q_468",Ys="_callOptionHeaderLeft_94r2q_475",Zs="_fallbackMethodRadio_94r2q_478",Gs="_sparklesIcon_94r2q_485",Js="_fallbackRecommendedTag_94r2q_490",Qs="_fallbackDivider_94r2q_511",Xs="_miniAudioPlayer_94r2q_525",n={container:as,tagContainer:ts,tagLabel:ss,itemIndex:ns,itemLabel:is,itemIconContainer:ls,whatsappStepHeader:rs,whatsappIconContainer:os,orderTypeStepHeader:cs,orderTypeIconContainer:ds,divider:ps,verticalDivider:us,descriptionLabel:ms,descriptionValue:hs,editIcon:gs,fallbackStepHeader:_s,fallbackIconContainer:fs,codToPrepaidConfigWrapper:bs,orderTypeBranchRow:xs,orderTypeBranchMainColumn:js,orderTypeBranchColumn:Cs,orderTypeBranchArrow:ys,codToPrepaidStepHeader:vs,codToPrepaidIconContainer:Ns,infoIcon:ws,arrowDot:Is,dashedLine:Ts,arrowRight:Ss,dashedLineVertical:Ds,arrowDown:ks,multilingualSparkleIcon:Fs,fallbackBox:Ls,fallbackContent:Es,fallbackContentSelected:Os,recommendedAiFallbackContent:As,fallbackContentFullWidth:Bs,ivrFallbackContent:Ps,fallbackDemoLabel:Ms,demoRow:Rs,multilingualDemoInlinePill:qs,multilingualDemoPlayerInline:Vs,multilingualDemoDividerInline:$s,multilingualDemoInlineLabel:Us,fallbackTryAiCallButton:Hs,fallbackAiCallDescription:Ws,fallbackAiCallLabel:zs,callOptionHeader:Ks,callOptionHeaderLeft:Ys,fallbackMethodRadio:Zs,sparklesIcon:Gs,fallbackRecommendedTag:Js,fallbackDivider:Qs,miniAudioPlayer:Xs},je=({children:i,className:o})=>e.jsx(t,{className:[n.container,o].filter(Boolean).join(" "),children:i}),Ie=({bgColor:i,label:o})=>e.jsx(t,{className:n.tagContainer,style:{backgroundColor:i},children:e.jsx("p",{className:n.tagLabel,children:o})}),en=()=>{const{query:i}=me(),a=i.current_tab==="order",s=a?"Order flow in Velocity Shipping system":"When an order is marked NDR",c=a?e.jsx(Ia,{}):e.jsx(Ta,{});return e.jsxs(t,{vertical:!0,align:"center",children:[e.jsx(t,{style:{marginLeft:-50},children:e.jsx(Ie,{bgColor:"#DBFFF9",label:"Starting Point"})}),e.jsxs(t,{children:[e.jsx(je,{children:e.jsxs(t,{align:"center",gap:6,style:{padding:"0 4px"},children:[e.jsx("p",{className:n.itemIndex,children:"1."}),e.jsxs(t,{align:"center",gap:8,children:[e.jsx(t,{className:n.itemIconContainer,justify:"center",align:"center",style:{backgroundColor:"#80869912"},children:c}),e.jsx("p",{className:n.itemLabel,children:s})]})]})}),e.jsx(ca,{})]})]})},an=()=>{const{isShipfastChildUser:i}=he(),[o,a]=h.useState(!1),[s,c]=h.useState(!1),{reloadAutomations:u,isValidating:g}=X(),{vasSubscriptions:r,reloadVasSubscriptions:m}=Le(),{currentAutomation:l,isEditable:v,isAutomationLocked:T,isPrimeAccount:N,isOrderTab:b}=M(),f=Ae({isShipfastChildUser:i,isPrimeAccount:N,isLocked:T}),C=l==null?void 0:l.attributes.config.whatsapp_automation.enabled,p=!!(l!=null&&l.attributes.config.ai_calling_automation.enabled),d=b?"Order Confirmation":"NDR Management",_=o,x=async(w,k)=>{const{ok:y,data:j}=await ee({automationId:(l==null?void 0:l.id)||"",updatedData:{automation:{enabled:!0,config:{...l==null?void 0:l.attributes.config,whatsapp_automation:{enabled:w}}}}});return y?(k!=null&&k.silent||$((j==null?void 0:j.message)||"Automation updated successfully"),u(),!0):(W((j==null?void 0:j.error)||"Failed to update automation"),!1)},S=async w=>{if(!w&&C){c(!0);return}a(!0),await x(w),a(!1)},L=async()=>{var y;a(!0);const w=!p;if(!await x(!1,{silent:w}))return a(!1),!1;if(w){const j=await oa({isOrderTab:b,vasSubscriptions:r});if(!j.ok)return await x(!0,{silent:!0}),W("data"in j&&((y=j.data)==null?void 0:y.error)||`Failed to turn off ${d}`),a(!1),!1;await m(),$(`${d} turned off successfully`)}return a(!1),!0},R=`Are you sure you want to turn off WhatsApp for ${d}?`;return e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:v?"":f,children:e.jsx(xe,{checked:C,checkedChildren:"On",unCheckedChildren:"Off",loading:_,disabled:_||g||i||!v,onChange:S})}),s&&e.jsx(la,{onClose:()=>c(!1),onConfirm:L,title:R,description:p?b?"Kindly note: Buyers will stop receiving confirmation messages on WhatsApp. Other
1channels will continue as usual.":"Kindly note: Buyers will stop getting WhatsApp alerts on failed deliveries. Other channels will continue as usual.":e.jsxs(e.Fragment,{children:["Kindly note:"," ",e.jsx("span",{className:ra.subServiceName,children:"WhatsApp"})," ","is the only channel still active. Turning it off disables"," ",d," entirely."]}),stillActiveChannels:p?["AI / IVR Call"]:[]})]})},fe=({onClick:i,isConfigEditable:o=!0,disableTooltip:a=""})=>e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:o?"":a,children:e.jsx(Ca,{className:n.editIcon,style:o?void 0:{opacity:.4,cursor:"not-allowed",pointerEvents:"auto"},onClick:o?i:void 0})}),Xe=()=>{const[i,o]=h.useState(!1),{currentAutomation:a,isConfigEditable:s}=M(),c=ie(),{appendParams:u}=me(),g="Type of orders to call on",r=a==null?void 0:a.attributes.config.order_type,m=r!=null&&r.is_cod&&(r!=null&&r.is_prepaid)?"COD & Prepaid":r!=null&&r.is_cod?"COD":r!=null&&r.is_prepaid?"Prepaid":"N/A";return console.log("isConfigEditable",s),e.jsxs(t,{vertical:!0,align:"center",style:{width:"100%"},children:[e.jsx(Ie,{bgColor:"#ECF3FF",label:"Do This"}),e.jsx(je,{children:e.jsxs(t,{vertical:!0,gap:6,style:{width:"100%"},children:[e.jsxs(t,{align:"center",gap:30,className:n.orderTypeStepHeader,justify:"space-between",children:[e.jsxs(t,{align:"center",gap:6,children:[e.jsx("p",{className:n.itemIndex,children:"2."}),e.jsxs(t,{align:"center",gap:8,children:[e.jsx(t,{className:n.orderTypeIconContainer,justify:"center",align:"center",children:e.jsx(ke,{})}),e.jsx("p",{className:n.itemLabel,children:g})]})]}),e.jsxs(t,{align:"center",gap:10,children:[e.jsx("div",{className:n.verticalDivider}),e.jsx(fe,{onClick:()=>o(!0),isConfigEditable:s,disableTooltip:c})]})]}),e.jsx(Q,{className:n.divider}),e.jsxs(t,{align:"center",style:{padding:4},gap:4,children:[e.jsx("p",{className:n.descriptionLabel,children:"Order Type:"}),e.jsx("p",{className:n.descriptionValue,children:m})]})]})}),i&&e.jsx(Nt,{onClose:()=>{u({tagsSearch:[]}),o(!1)}})]})},tn=({children:i})=>{const{query:o}=me(),a=o.current_tab==="order",{isFeatureEnabled:s}=ba("ndr_cod_to_prepaid");return!a&&!s?e.jsxs(t,{vertical:!0,align:"center",style:{width:"100%"},children:[e.jsx(Xe,{}),e.jsx(Fe,{}),i]}):e.jsx(t,{vertical:!0,align:"flex-start",style:{width:"100%"},children:e.jsxs(t,{align:"flex-start",className:n.orderTypeBranchRow,children:[e.jsxs(t,{vertical:!0,align:"center",className:n.orderTypeBranchMainColumn,children:[e.jsx(Xe,{}),e.jsx(Fe,{}),i]}),e.jsx(t,{className:n.orderTypeBranchArrow,align:"center",children:e.jsx(ca,{})}),e.jsx(t,{vertical:!0,align:"center",className:n.orderTypeBranchColumn,children:e.jsx(cn,{})})]})})},sn=()=>{const[i,o]=h.useState(!1),{query:a}=me(),c=a.current_tab==="order";M();const u=ie(),[g,r]=h.useState(!1),[m,l]=h.useState(!1),v=c?"WhatsApp Order Confirmation":"WhatsApp NDR Management";return e.jsxs(t,{vertical:!0,align:"center",style:{width:"100%"},children:[e.jsx(Ie,{bgColor:"#ECF3FF",label:"Do This"}),e.jsx(je,{children:e.jsxs(t,{vertical:!0,gap:6,style:{width:"100%"},children:[e.jsxs(t,{align:"center",gap:30,className:n.whatsappStepHeader,justify:"space-between",children:[e.jsxs(t,{align:"center",gap:6,children:[e.jsx("p",{className:n.itemIndex,children:"3."}),e.jsxs(t,{align:"center",gap:8,children:[e.jsx(t,{className:n.whatsappIconContainer,justify:"center",align:"center",children:e.jsx(xa,{})}),e.jsx("p",{className:n.itemLabel,children:v})]}),e.jsx(U,{title:"Send an automated WhatsApp message to the customer to confirm the order",color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsx(ue,{className:n.infoIcon})})]}),e.jsxs(t,{align:"center",gap:10,children:[e.jsx("div",{className:n.verticalDivider}),e.jsx(an,{}),c&&e.jsx(fe,{onClick:()=>r(!0),disableTooltip:u}),!c&&e.jsx(fe,{onClick:()=>l(!0),disableTooltip:u})]})]}),e.jsx(Q,{className:n.divider}),e.jsxs(t,{align:"center",style:{padding:4},children:[e.jsx("p",{className:n.descriptionLabel,children:"Preview:"}),e.jsx(be,{size:"small",type:"link",onClick:()=>o(!0),children:e.jsxs(t,{align:"center",gap:4,children:[e.jsx(Ha,{}),e.jsx("p",{children:"View"})]})})]})]})}),i&&e.jsx(nt,{onClose:()=>o(!1)}),g&&e.jsx(Dt,{onClose:()=>r(!1)}),m&&e.jsx(Pt,{onClose:()=>l(!1)})]})},nn=()=>{const[i,o]=h.useState(!1),{currentAutomation:a}=M(),s=ie(),c=a==null?void 0:a.attributes.config.ai_calling_automation.wait_time,{hours:u,minutes:g}=ia(Number(c)),r=u>0?`${u} ${_e("hour",u)} ${g} ${_e("minute",g)}`:`${g} ${_e("minute",g)}`;return e.jsxs(je,{children:[e.jsxs(t,{align:"center",justify:"space-between",gap:30,style:{width:"100%",padding:"0 4px"},children:[e.jsxs(t,{align:"center",gap:6,children:[e.jsx("p",{className:n.itemIndex,children:"4."}),e.jsxs(t,{align:"center",gap:8,children:[e.jsx(t,{className:n.itemIconContainer,justify:"center",align:"center",style:{backgroundColor:"#80869912"},children:e.jsx(Bt,{})}),e.jsxs("p",{className:n.itemLabel,children:["Interval: ",r]})]})]}),e.jsxs(t,{align:"center",gap:10,children:[e.jsx("div",{className:n.verticalDivider}),e.jsx(fe,{onClick:()=>o(!0),disableTooltip:s}
1)]})]}),i&&e.jsx(At,{onClose:()=>o(!1),isThirdStep:!0})]})},ln=()=>{const{isShipfastChildUser:i}=he(),[o,a]=h.useState(!1),[s,c]=h.useState(!1),{reloadAutomations:u,isValidating:g}=X(),{vasSubscriptions:r,reloadVasSubscriptions:m}=Le(),{currentAutomation:l,isEditable:v,isAutomationLocked:T,isPrimeAccount:N,isOrderTab:b}=M(),f=Ae({isShipfastChildUser:i,isPrimeAccount:N,isLocked:T}),C=l==null?void 0:l.attributes.config.ai_calling_automation.enabled,p=!!(l!=null&&l.attributes.config.whatsapp_automation.enabled),d=b?"Order Confirmation":"NDR Management",_=o,x=async(w,k)=>{const{ok:y,data:j}=await ee({automationId:(l==null?void 0:l.id)||"",updatedData:{automation:{enabled:!0,config:{...l==null?void 0:l.attributes.config,ai_calling_automation:{...l==null?void 0:l.attributes.config.ai_calling_automation,enabled:w}}}}});return y?(k!=null&&k.silent||$((j==null?void 0:j.message)||"Automation updated successfully"),u(),!0):(W((j==null?void 0:j.error)||"Failed to update automation"),!1)},S=async w=>{if(!w&&C){c(!0);return}a(!0),await x(w),a(!1)},L=async()=>{var y;a(!0);const w=!p;if(!await x(!1,{silent:w}))return a(!1),!1;if(w){const j=await oa({isOrderTab:b,vasSubscriptions:r});if(!j.ok)return await x(!0,{silent:!0}),W("data"in j&&((y=j.data)==null?void 0:y.error)||`Failed to turn off ${d}`),a(!1),!1;await m(),$(`${d} turned off successfully`)}return a(!1),!0},R=`Are you sure you want to turn off AI / IVR Call for ${d}?`;return e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:v?"":f,children:e.jsx(xe,{checked:C,checkedChildren:"On",unCheckedChildren:"Off",loading:_,disabled:_||g||i||!v,onChange:S})}),s&&e.jsx(la,{onClose:()=>c(!1),onConfirm:L,title:R,description:p?b?"Kindly note: Buyers will no longer get confirmation calls. Other channels will continue as usual.":"Kindly note: Buyers will no longer be called after a failed delivery attempt. Other channels will continue as usual.":e.jsxs(e.Fragment,{children:["Kindly note:"," ",e.jsx("span",{className:ra.subServiceName,children:"AI / IVR Call"})," ","is the only channel still active. Turning it off disables"," ",d," entirely."]}),stillActiveChannels:p?["WhatsApp"]:[]})]})},rn=()=>{var Me,Re,qe,Ve;const[i,o]=h.useState(!1),{currentAutomation:a,isLoading:s,isEditable:c}=M(),u=ie(),{query:g}=me(),r=g.current_tab==="order",[m,l]=h.useState("ai_call"),[v,T]=h.useState(!1),[N,b]=h.useState({show:!1,agentId:"",isIvrCalling:!1}),{reloadAutomations:f}=X(),{agents:C}=va();h.useEffect(()=>{const B=a==null?void 0:a.attributes.config.ai_calling_automation.calling_method;l(B===1||B==="1"||B==="ivr_call"?"ivr":"ai_call")},[a,r]);const p=h.useMemo(()=>{const B=r?"order_and_address_confirmation":"ndr_management";return C.find(H=>{var Y,te;return((Y=H.attributes)==null?void 0:Y.key)===B&&((te=H.attributes)==null?void 0:te.agent_type)==="ai"})||C.find(H=>{var Y;return((Y=H.attributes)==null?void 0:Y.key)===B})},[C,r]),d=h.useMemo(()=>{if(m!=="ivr")return p;const B=r?"order_and_address_confirmation":"ndr_management",H=O=>{var z,se;return(((z=O==null?void 0:O.attributes)==null?void 0:z.agent_name)||((se=O==null?void 0:O.attributes)==null?void 0:se.agent_type)||"").toLowerCase()},Y=C.find(O=>{var z,se;return((z=O.attributes)==null?void 0:z.key)===B&&(((se=O.attributes)==null?void 0:se.agent_type)==="ivr"||H(O).includes("ivr"))});return Y||C.find(O=>{const z=H(O);return z.includes("ivr")?r?z.includes("order"):z.includes("ndr"):!1})||p},[C,p,r,m]),_=d,x=r?"order_and_address_confirmation":"ndr_management",S=h.useMemo(()=>{var te,O,z;const B=a==null?void 0:a.attributes.config.ai_calling_automation.ivr_language;return(((te=d==null?void 0:d.attributes)==null?void 0:te.primary_language)||((z=(O=C.find(se=>{var $e,Ue,He;return(($e=se.attributes)==null?void 0:$e.key)===x&&((He=(Ue=se.attributes)==null?void 0:Ue.agent_name)==null?void 0:He.toLowerCase().includes("ivr"))}))==null?void 0:O.attributes)==null?void 0:z.primary_language)||B||"en")==="hi"?"hi":"en"},[C,a,d,x]),L=h.useMemo(()=>ka({isOrderTab:r,language:S}),[S,r]),R=(Re=(Me=p==null?void 0:p.attributes)==null?void 0:Me.key)==null?void 0:Re.replaceAll("_"," "),w=a==null?void 0:a.attributes.config.ai_calling_automation.retry_count,k=a==null?void 0:a.attributes.config.ai_calling_automation.retry_interval,{hours:y,minutes:j}=ia(Number(k)),ae=y>0?`${y} ${_e("hr",y)} ${j}
1 ${_e("min",j)}`:`${j} ${_e("min",j)}`,Z=r?"AI Call for Order Confirmation":"AI Call for NDR Management",{audioUrl:G,audioDuration:E}=r?{audioUrl:"https://assets-ve.s3.us-east-2.amazonaws.com/automation_order_confirmation_sample.wav",audioDuration:68}:{audioUrl:"https://assets-ve.s3.us-east-2.amazonaws.com/automation_ndr_sample.mp3",audioDuration:107},Ce=((qe=p==null?void 0:p.attributes)==null?void 0:qe.multilingual)===Fa.enable||((Ve=p==null?void 0:p.attributes)==null?void 0:Ve.primary_language)===La,Te=r?Ge.orderConfirmation:Ge.ndrManagement,ge=s||v,da=()=>{if(ge)return;const B=m==="ivr",H=(B?_==null?void 0:_.id:p==null?void 0:p.id)||"";H&&b({show:!0,agentId:H,isIvrCalling:B})},Pe=async B=>{const H=m;l(B),T(!0);const Y=B==="ai_call"?"ai_call":"ivr_call",{ok:te,data:O}=await ee({automationId:(a==null?void 0:a.id)||"",updatedData:{automation:{enabled:!0,config:{...a==null?void 0:a.attributes.config,ai_calling_automation:{...a==null?void 0:a.attributes.config.ai_calling_automation,calling_method:Y,ivr_language:B==="ivr"?S:void 0}}}}});if(T(!1),!te){l(H),W((O==null?void 0:O.error)||"Failed to update calling method");return}$((O==null?void 0:O.message)||"Calling method updated successfully"),f()};return e.jsxs(t,{vertical:!0,align:"center",style:{width:"100%"},children:[e.jsx(Ie,{bgColor:"#ECF3FF",label:"Do This"}),e.jsx(je,{className:n.fallbackBox,children:e.jsxs(t,{vertical:!0,gap:6,style:{width:"100%"},children:[e.jsxs(t,{align:"center",gap:30,className:n.fallbackStepHeader,justify:"space-between",children:[e.jsxs(t,{align:"center",gap:6,children:[e.jsx("p",{className:n.itemIndex,children:"5."}),e.jsxs(t,{align:"center",gap:8,children:[e.jsx(t,{className:n.fallbackIconContainer,justify:"center",align:"center",children:e.jsx(ke,{})}),e.jsx("p",{className:n.itemLabel,children:"Calling Method (Fall back)"})]}),e.jsx(U,{title:"If the customer doesn't respond on WhatsApp within the defined wait time, initiate an AI-powered call for order confirmation.",color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsx(ue,{className:n.infoIcon})})]}),e.jsxs(t,{align:"center",gap:10,children:[e.jsx("div",{className:n.verticalDivider}),e.jsx(ln,{}),e.jsx(fe,{onClick:da,isConfigEditable:!ge&&!!(m==="ivr"?_!=null&&_.id:p!=null&&p.id),disableTooltip:u})]})]}),e.jsxs(t,{vertical:!0,gap:6,style:{width:"calc(100% - 20px)",marginLeft:"8px",marginRight:"8px"},children:[e.jsx(Q,{className:n.divider}),e.jsxs(t,{vertical:!0,gap:8,children:[e.jsxs(t,{className:F(n.fallbackContent,n.recommendedAiFallbackContent,n.fallbackContentFullWidth,{[n.fallbackContentSelected]:m==="ai_call"}),vertical:!0,gap:10,style:{padding:16},children:[e.jsx(Ke,{className:n.fallbackMethodRadio,checked:m==="ai_call",onChange:()=>Pe("ai_call"),disabled:ge||!c,children:e.jsxs(t,{align:"center",gap:4,className:n.callOptionHeader,children:[e.jsxs(t,{align:"center",gap:4,children:[e.jsx(Ze,{className:n.sparklesIcon}),e.jsx("p",{className:n.fallbackAiCallLabel,children:"AI Call"})]}),e.jsx(t,{className:n.fallbackRecommendedTag,children:e.jsx("span",{children:"Recommended"})})]})}),e.jsx("p",{className:n.fallbackAiCallDescription,children:"Natural conversational AI that adapts to customer responses"}),e.jsxs(t,{align:"center",gap:10,className:n.demoRow,children:[e.jsx("p",{className:n.fallbackDemoLabel,children:"Demo:"}),e.jsx(t,{align:"center",gap:4,children:e.jsx(Ee,{className:n.miniAudioPlayer,playerType:"mini",audioLink:G,audioDuration:E})}),e.jsx(ja,{onClick:()=>o(!0),size:"small",icon:e.jsx(ke,{}),className:n.fallbackTryAiCallButton,children:"Try AI Call"}),!Ce&&e.jsxs(t,{align:"center",className:n.multilingualDemoInlinePill,gap:6,children:[e.jsx(Ee,{audioLink:Te.audioUrl,audioId:`${Z}-multilingual`,audioDuration:Te.audioDuration,className:n.multilingualDemoPlayerInline}),e.jsx("div",{className:n.multilingualDemoDividerInline}),e.jsx(Ze,{className:n.multilingualSparkleIcon}),e.jsx("p",{className:n.multilingualDemoInlineLabel,children:"Multilingual"})]})]})]}),e.jsxs(t,{className:F(n.fallbackContent,{[n.ivrFallbackContent]:!0,[n.fallbackContentFullWidth]:!0,[n.fallbackContentSelected]:m==="ivr"}),vertical:!0,gap:10,style:{padding:16},children:[e.jsx(Ke,{className:n.fallbackMethodRadio,checked:m==="ivr",onChange:()=>Pe("ivr"),disabled:ge||!c,children:e.jsxs(t,{align:"center",gap:4,className:`${n.callOptionHeader} ${n.callOptionHeaderLeft}`,children:[e.jsx(ke,{style:{color:"#2ACA74"}}),e.jsx("p",{className:n.fallbackAiCallLabel,children:"IVR Call (Traditional)"})]})}),e.jsx("p",{className:n.fallbackAiCallDescription,children:"Menu-based system with keypad input
1s (Press 1 or 2)"}),e.jsxs(t,{align:"center",gap:10,className:n.demoRow,children:[e.jsx("p",{className:n.fallbackDemoLabel,children:"Demo:"}),e.jsx(t,{align:"center",gap:4,children:e.jsx(Ee,{className:n.miniAudioPlayer,playerType:"mini",audioLink:L.audioUrl,audioDuration:L.audioDuration,audioId:`${Z}-ivr-${S}`},`${Z}-ivr-${S}`)})]})]})]}),m==="ai_call"&&e.jsxs(e.Fragment,{children:[e.jsx(Q,{className:n.fallbackDivider}),e.jsxs(t,{align:"center",style:{padding:4},gap:10,children:[e.jsxs(t,{align:"center",gap:4,children:[e.jsx("p",{className:n.descriptionLabel,children:"Retry Call:"}),e.jsx("p",{className:n.descriptionValue,children:w})]}),e.jsx(Q,{type:"vertical"}),e.jsxs(t,{align:"center",gap:4,children:[e.jsx("p",{className:n.descriptionLabel,children:"Interval between calls:"}),e.jsx("p",{className:n.descriptionValue,children:ae})]})]})]})]})]})}),N.show&&e.jsx(wa,{onCloseDrawer:()=>b({show:!1,agentId:"",isIvrCalling:!1}),agentId:N.agentId,agentName:R||"",isIvrCalling:N.isIvrCalling}),i&&e.jsx(ht,{onClose:()=>o(!1),isIvrCalling:m==="ivr"})]})},on=()=>{const{isShipfastChildUser:i}=he(),[o,a]=h.useState(!1),{reloadAutomations:s,isValidating:c}=X(),{currentAutomation:u,isEditable:g,isAutomationLocked:r,isPrimeAccount:m}=M(),l=Ae({isShipfastChildUser:i,isPrimeAccount:m,isLocked:r}),v=Be(u==null?void 0:u.attributes.config.cod_to_prepaid_automation),T=v.enabled,N=async b=>{var S,L;a(!0);const f=u==null?void 0:u.attributes.config,C=!!((S=f==null?void 0:f.whatsapp_automation)!=null&&S.enabled),p=!!((L=f==null?void 0:f.ai_calling_automation)!=null&&L.enabled),d=b&&!C&&!p,{ok:_,data:x}=await ee({automationId:(u==null?void 0:u.id)||"",updatedData:{automation:{enabled:!0,config:{...f,cod_to_prepaid_automation:{...v,enabled:b},...d?{whatsapp_automation:{...f==null?void 0:f.whatsapp_automation,enabled:!0}}:{}}}}});if(a(!1),!_){W((x==null?void 0:x.error)||"Failed to update COD to Prepaid automation");return}d?$(`${(x==null?void 0:x.message)||"Automation updated successfully"}. WhatsApp is enabled too.`):$((x==null?void 0:x.message)||"Automation updated successfully"),s()};return e.jsx(U,{color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},title:g?"":l,children:e.jsx(xe,{checked:T,checkedChildren:"On",unCheckedChildren:"Off",loading:o,disabled:o||c||i||!g,onChange:N})})},cn=()=>{const[i,o]=h.useState(!1),{currentAutomation:a}=M(),s=ie(),c=Be(a==null?void 0:a.attributes.config.cod_to_prepaid_automation);return e.jsxs(t,{vertical:!0,align:"center",className:n.codToPrepaidConfigWrapper,children:[e.jsx(Ie,{bgColor:"#F2EDFF",label:"New"}),e.jsx(je,{children:e.jsxs(t,{vertical:!0,gap:6,style:{width:"100%"},children:[e.jsxs(t,{align:"center",gap:30,className:n.codToPrepaidStepHeader,justify:"space-between",children:[e.jsxs(t,{align:"center",gap:8,children:[e.jsx(t,{className:n.codToPrepaidIconContainer,justify:"center",align:"center",children:e.jsx(Ea,{})}),e.jsx("p",{className:n.itemLabel,children:"Convert COD to Prepaid"}),e.jsx(t,{align:"center",gap:4,children:e.jsx(U,{title:"COD orders will be offered prepaid conversion through WhatsApp and/or AI calling, based on your enabled channels",color:"#FFFFFF",overlayInnerStyle:{color:"#3D3D6B"},children:e.jsx(ue,{className:n.infoIcon})})})]}),e.jsxs(t,{align:"center",gap:10,children:[e.jsx("div",{className:n.verticalDivider}),e.jsx(on,{}),e.jsx(fe,{onClick:()=>o(!0),disableTooltip:s}
1)]})]}),e.jsx(Q,{className:n.divider}),e.jsxs(t,{align:"center",style:{padding:4},gap:10,children:[e.jsxs(t,{align:"center",gap:4,children:[e.jsx("p",{className:n.descriptionLabel,children:"Prepaid Type :"}),e.jsx("p",{className:n.descriptionValue,children:$a[c.payment_type]})]}),e.jsx(Q,{type:"vertical"}),e.jsx(t,{align:"center",gap:4,children:e.jsx("p",{className:n.descriptionValue,children:Ua(c)})})]})]})}),i&&e.jsx(es,{onClose:()=>o(!1)})]})},ca=()=>e.jsxs(t,{style:{width:100,marginLeft:-3},align:"center",children:[e.jsx("div",{className:n.arrowDot}),e.jsx("div",{className:n.dashedLine}),e.jsx("div",{className:n.arrowRight})]}),Fe=()=>e.jsxs(t,{vertical:!0,style:{height:30,marginTop:-3},align:"center",children:[e.jsx("div",{className:n.arrowDot}),e.jsx("div",{className:n.dashedLineVertical}),e.jsx("div",{className:n.arrowDown})]}),dn="_container_1njuu_10",pn="_contentContainer_1njuu_31",ea={container:dn,contentContainer:pn},hi=()=>{var C,p,d;const{query:i}=me(),o=i.current_tab,{vasSubscriptions:a}=Le(),{currentAutomation:s}=M();s==null||s.attributes.enabled;const c=o==="order",u=c?ve.AUTOMATION_ORDER_CONFIRMATION:ve.AUTOMATION_NDR_MANAGEMENT,g=c?"Order Confirmation":"NDR Management",r=c?"Automate order verification via WhatsApp, Vani AI calls , and Velocity Shipping-assisted calls to minimize RTO risk":"Automate NDR verification via WhatsApp, AI calls, and Velocity Shipping-assisted calls to Boost Conversion.",m=c?"shipping_vas_automation_order_confirmation.svg":"shipping_vas_automation_ndr_management.svg",l=a.find(_=>_.attributes.service===u),v=(C=l==null?void 0:l.attributes)==null?void 0:C.is_active,T=(p=l==null?void 0:l.attributes)==null?void 0:p.is_free_trial_active,N=(d=l==null?void 0:l.attributes)==null?void 0:d.free_trial_status;return(T?N:v)?e.jsxs(t,{vertical:!0,gap:10,className:ea.container,children:[e.jsx(Je,{subscriptionService:u,title:g,description:r,priceDescription:"per order",backgroundImage:m}),e.jsxs(t,{className:ea.contentContainer,children:[e.jsx(en,{}),e.jsx(t,{vertical:!0,children:e.jsxs(tn,{children:[e.jsx(sn,{}),e.jsx(Fe,{}),e.jsx(nn,{}),e.jsx(Fe,{}),e.jsx(rn,{})]})})]})]}):e.jsxs(t,{vertical:!0,gap:10,style:{flex:1},children:[e.jsx(Je,{subscriptionService:u,title:g,description:r,priceDescription:"per order",backgroundImage:m}),e.jsx(Ga,{})]})};export{hi 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.