1import{r as E,j as e,bd as s,aP as N,aS as A,aU as w,c as C,N as L,bw as V}from"./index-BYjmYzu-.js";import{E as I}from"./edit_details_button-Cfycy85x.js";import{E as S}from"./edit_agent_drawer-CHAJnO5a.js";import{u as y,i as k}from"./index-ntXxdHkP.js";import{b as P}from"./utils-k_PfN3YJ.js";import{A as G}from"./constant-DemJVWh6.js";import{C as R}from"./col-DSokC5oO.js";import{V as F}from"./vas_info-CKGXV6Ze.js";import{V as T}from"./utils-0rEeyWE7.js";import"./EditPencil-BGoWgho6.js";import"./index-Cy7Vl5oX.js";import"./CloseIcon-DqZkkrpQ.js";import"./index-ByjQY1tN.js";import"./index-CZNe-HiK.js";import"./Portal-BnIU9h3K.js";import"./getScrollBarSize-BX5bDlpW.js";import"./form_utils-BRD3em_d.js";import"./index-Ck98gylS.js";import"./InfoCircleOutlined-DObI79rA.js";import"./index-CSibPLgg.js";import"./disable_tooltips-CFCTnA_K.js";import"./index-D6c-D_1p.js";import"./modal_component-CgKrFsb7.js";import"./modal_header-su8lU-Gk.js";import"./index-BNQX9KrA.js";import"./DialogWrap-BcWh8mEF.js";import"./useId-CCfbXMy0.js";import"./WarningHeader-C1-CdYei.js";import"./vas_trial_utils-X20AYrox.js";import"./WhatsAppLine-CXO5HBZO.js";import"./common_utils-apf5QVJD.js";import"./integrations_constants-CA4Ima8N.js";const z="_title_1tglx_10",M="_description_1tglx_16",O="_accountDetailsContainer_1tglx_22",U="_accountDetailsLabel_1tglx_29",B="_accountDetailsValue_1tglx_34",o={title:z,description:M,accountDetailsContainer:O,accountDetailsLabel:U,accountDetailsValue:B},K=({agentId:l})=>{var g,x,b,f,j,D,h;const{agents:n}=y(),{automations:i}=P(),t=n==null?void 0:n.find(a=>a.id===l),r=i==null?void 0:i.find(a=>{var v;return a.attributes.key===((v=t==null?void 0:t.attributes)==null?void 0:v.key)}),p=((g=r==null?void 0:r.attributes)==null?void 0:g.editable)!==!1,[c,m]=E.useState(!1),_=(b=(x=t==null?void 0:t.attributes)==null?void 0:x.key)==null?void 0:b.replaceAll("_"," "),u=[{label:"Agent Name",value:(f=t==null?void 0:t.attributes)==null?void 0:f.agent_name,key:"agent_name"},{label:"Agent Gender",value:(j=t==null?void 0:t.attributes)==null?void 0:j.gender,key:"agent_gender"},{label:"Agent Language",value:G[((D=t==null?void 0:t.attributes)==null?void 0:D.primary_language)||"hi"],key:"agent_language"},{label:"Enable Auto Calling",value:(h=t==null?void 0:t.attributes)!=null&&h.auto_calling_enabled?"On":"Off",key:"agent_auto_calling"}];return e.jsxs(s,{className:o.accountDetailsContainer,vertical:!0,gap:24,children:[e.jsxs(s,{vertical:!0,children:[e.jsxs("p",{className:o.title,children:[_," Agent"]}),e.jsx("p",{className:o.description,children:"View / Edit your agent details"})]}),e.jsx(N,{gutter:[16,16],children:u==null?void 0:u.map(a=>e.jsx(R,{xs:24,sm:24,md:12,xl:8,xxl:6,children:e.jsxs(s,{vertical:!0,gap:4,children:[e.jsx("p",{className:o.accountDetailsLabel,children:a==null?void 0:a.label}),e.jsx("p",{className:o.accountDetailsValue,children:a==null?void 0:a.value})]})},a==null?void 0:a.label))}),e.jsx(s,{children:e.jsx(I,{onEditClick:()=>m(!0),buttonText:"Edit Agent Details",disabled:!p})}),c&&e.jsx(S,{onCloseDrawer:()=>m(!1),agentId:l,agentName:_})]})},$="_container_j9t75_10",q="_divider_j9t75_13",H="_loaderContainer_j9t75_16",J="_agentsContainer_j9t75_19",d={container:$,divider:q,loaderContainer:H,agentsContainer:J};function Q(){const{isLoading:l}=A(),{isFeatureEnabled:n}=w("cred_client"),{agents:i,isLoading:t}=y(),r=(i==null?void 0:i.filter(k))??[],p=T.AI_CALLING;return l?e.jsx(C,{}):n?e.jsx(L,{to:"/shipping/dashboard",replace:!0}):e.jsxs(s,{vertical:!0,gap:16,className:d.container,children:[e.jsx(V,{className:d.divider}),e.jsx(F,{subscriptionService:p,title:"AI Call Agent - Powered by Vani AI",description:"Initiate AI call to verify new orders and NDRs to minimize RTOs and maximize conversions without any hassle",priceDescription:"per minute",backgroundImage:"shipfast_vas_ai.svg"}),t?e.jsx(s,{className:d.loaderContainer,justify:"center",align:"center",children:e.jsx(C,{})}):e.jsx(s,{vertical:!0,gap:16,className:d.agentsContainer,children:r.map(c=>e.jsx(K,{agentId:c.id},c.id))})]})}Q.displayName="AICallAgent";export{Q as Component};
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.