"use strict";(self.webpackChunkclient=self.webpackChunkclient||[]).push([[9311],{88918:(e,s,a)=>{a.d(s,{A:()=>l});var t=a(89379),i=a(1880);const l=()=>({getApiData:async(e,s,a)=>{let l={token:i.A.get("token")};s&&(l=(0,t.A)((0,t.A)({},l),{},{id:s})),a&&(l=(0,t.A)((0,t.A)({},l),{},{barCode:a}));try{const s="https://ezybill.ureshiiweightloss.com/api/v1"+"/".concat(e,"/get"),a=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});return await a.json()}catch(n){return n}}})},79311:(e,s,a)=>{a.r(s),a.d(s,{default:()=>x});var t=a(65043),i=a(75206),l=a(86319),n=a(53435),c=a(66580),d=a(88918),r=a(70579);const x=()=>{const{id:e}=(0,c.g)(),s=(0,c.Zp)(),[a,x]=(0,t.useState)(),{getApiData:o}=(0,d.A)(),[h,j]=(0,t.useState)();return(0,t.useEffect)((()=>{(async()=>{var s;const a=await o("category",e),t=await o("tax",null===a||void 0===a||null===(s=a.data)||void 0===s?void 0:s.tax);j(t.data),x(a.data)})()}),[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{title:"Category Details"}),(0,r.jsxs)("main",{id:"main",children:[(0,r.jsx)(l.A,{}),(0,r.jsx)("div",{className:"content__body",children:(0,r.jsxs)("div",{className:"content__body__main w-full",children:[(0,r.jsxs)("div",{className:"details__header",children:[(0,r.jsxs)("p",{children:[(0,r.jsx)(n.F.INVOICE,{}),"General Details"]}),(0,r.jsx)(n.F.PENCIL,{onClick:()=>s("/admin/item-category/edit/".concat(e)),className:"pencil"})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)("div",{className:"flex gap-2 pl-4",children:[(0,r.jsxs)("div",{className:"flex flex-col text-xs w-full gap-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Category Name"}),(0,r.jsx)("p",{children:null===a||void 0===a?void 0:a.title})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Type"}),(0,r.jsx)("p",{children:(null===a||void 0===a?void 0:a.type)||"--"})]})]}),(0,r.jsxs)("div",{className:"flex flex-col text-xs w-full gap-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-gray-400",children:"HSN"}),(0,r.jsx)("p",{children:(null===a||void 0===a?void 0:a.hsn)||"--"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Tax"}),(0,r.jsx)("p",{children:(null===h||void 0===h?void 0:h.title)||"--"})]})]})]})]})})]})]})}}}]);
//# sourceMappingURL=9311.bea1c121.chunk.js.map