import{j as s}from"./vendor-mui-69397583.js";import{j as w,r as M}from"./vendor-react-ece1c85f.js";import{Y as R,l as T,E as z,Z as F}from"./index-c62ac197.js";import{A}from"./AdaptableCard-df7695d6.js";import{u as I,r as L,g as S}from"./index-49a94e54.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./ContactService-92281a90.js";import"./AccountServices-62599aae.js";R("ContactsData",L);const $=W=>{var m;let{id:l}=w();const P=T(),Y=I(d=>{var i,r;return(r=(i=d.ContactsData)==null?void 0:i.data)==null?void 0:r.loading}),e=I(d=>{var i,r,c,a,n,h,p,x,j,o,t,N,g,b,u,v,y,C,f,E;return{...(r=(i=d.ContactsData)==null?void 0:i.data)==null?void 0:r.contact,posistion:{value:(n=(a=(c=d.ContactsData)==null?void 0:c.data)==null?void 0:a.contact)==null?void 0:n.contactPosistionId,label:(x=(p=(h=d.ContactsData)==null?void 0:h.data)==null?void 0:p.contact)==null?void 0:x.contactPosistion},accountId:{value:(t=(o=(j=d.ContactsData)==null?void 0:j.data)==null?void 0:o.contact)==null?void 0:t.accountId,label:(b=(g=(N=d.ContactsData)==null?void 0:N.data)==null?void 0:g.contact)==null?void 0:b.accountName},department:{label:(y=(v=(u=d.ContactsData)==null?void 0:u.data)==null?void 0:v.contact)==null?void 0:y.department,value:(E=(f=(C=d.ContactsData)==null?void 0:C.data)==null?void 0:f.contact)==null?void 0:E.departmentId}}}),O=d=>{P(S({id:d}))};return M.useEffect(()=>{l&&O(l)},[l]),s.jsx(s.Fragment,{children:s.jsxs(z,{loading:Y,children:[s.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:s.jsx("div",{className:"lg:flex items-center justify-between",children:s.jsx("h3",{className:"mb-4 lg:mb-0",children:"Contact Detail"})})}),s.jsx(A,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:s.jsxs(A,{className:"py-4 px-6 borderless",children:[s.jsx("h3",{className:"mt-2 mtb-2 lg:mb-0",children:"Details"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Name"}),s.jsx("h6",{children:e==null?void 0:e.contactName})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Number"}),s.jsx("h6",{children:e==null?void 0:e.contactNumber})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Email"}),s.jsx("h6",{children:e==null?void 0:e.email})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Account Name"}),s.jsx("h6",{children:e==null?void 0:e.accountName})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Position"}),s.jsx("h6",{children:e==null?void 0:e.contactPosistion})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Department"}),s.jsx("h6",{children:(m=e==null?void 0:e.department)==null?void 0:m.label})]})]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Time"}),s.jsx("h6",{children:e==null?void 0:e.preferredContactTime})]})}),s.jsx("hr",{}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Address"}),s.jsxs("h6",{children:[e==null?void 0:e.address,", ",e==null?void 0:e.state,", ",e==null?void 0:e.city,", ",e==null?void 0:e.zip]})]})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Industry"}),s.jsx("h6",{children:e==null?void 0:e.industry})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"No Of Employees"}),s.jsx("h6",{children:e==null?void 0:e.noOfEmployees})]})]}),s.jsx("hr",{}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Website"}),s.jsx("h6",{children:e==null?void 0:e.website})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Notes"}),s.jsx("h6",{children:e==null?void 0:e.notes})]})]}),s.jsx("hr",{}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Created On"}),s.jsx("h6",{children:e!=null&&e.createdDate?F(e==null?void 0:e.createdDate).format("MM/DD/YYYY"):""})]})})]})})]})})};export{$ as default};
