import{al as j,bi as v,r as y,az as z,j as r,f as i,S as B,T as C,aj as s}from"./index.8f299a7d.js";import{P as N}from"./Page.4c1db0aa.js";import{H as k}from"./HeaderBreadcrumbs.da67f38c.js";import{C as D}from"./CorporateTabNavigations.42a351a3.js";import{C as G}from"./Card.1ec83a31.js";import{G as c}from"./Grid.358b274d.js";import{T,a as g,b as l,c as a}from"./TableRow.d2ef76cd.js";function Y(){var d,h,o,m,p,u,x,f,_,b;j();const{corporate_id:t}=v(),[e,S]=y.exports.useState();y.exports.useEffect(()=>{z.get(`corporates/${t}`).then(P=>{S(P.data)})},[]);const n={fontWeight:"bold"};return r(N,{title:"Dashboard",children:[i(k,{heading:"Corporate Dashboard",links:[{name:"Corporates",href:"/corporates"},{name:(d=e==null?void 0:e.name)!=null?d:"-",href:"/corporates/"+t}]}),i(G,{children:r(B,{spacing:"3",children:[i(D,{position:""}),r(c,{container:!0,spacing:3,children:[r(c,{item:!0,md:6,sx:{p:2},children:[i(C,{sx:{...n,px:3,fontSize:"24px"},children:"Current Policy "}),i(T,{children:r(g,{children:[r(l,{children:[i(a,{sx:n,children:"Policy Name"}),i(a,{children:(h=e==null?void 0:e.current_policy)==null?void 0:h.code})]}),r(l,{children:[i(a,{sx:n,children:"Total Premi"}),i(a,{children:s((o=e==null?void 0:e.current_policy)==null?void 0:o.total_premi)})]}),r(l,{children:[i(a,{sx:n,children:"Stop Service"}),i(a,{children:s((m=e==null?void 0:e.current_policy)==null?void 0:m.minimal_stop_service_net)})]}),r(l,{children:[i(a,{sx:n,children:"Balance"}),i(a,{children:s((p=e==null?void 0:e.current_policy)==null?void 0:p.limit_balance)})]})]})})]}),r(c,{item:!0,md:6,sx:{p:2},children:[i(C,{sx:{...n,px:3,fontSize:"24px"},children:"Claims"}),i(T,{children:r(g,{children:[r(l,{children:[i(a,{sx:n,children:"Number Of Claim"}),i(a,{children:(u=e==null?void 0:e.current_policy)==null?void 0:u.code})]}),r(l,{children:[i(a,{sx:n,children:"Total Usage This Year"}),i(a,{children:s(((f=(x=e==null?void 0:e.current_policy)==null?void 0:x.total_premi)!=null?f:0)-((b=(_=e==null?void 0:e.current_policy)==null?void 0:_.limit_balance)!=null?b:0))})]})]})})]})]})]})})]})}export{Y as default};
