1import{j as t,o as C,r as p}from"./react-vendor-CmIYNeTI.js";import{C as n,T as s,R as l,M as u,u as I,L as $,ap as w}from"./index-C2XxRRI6.js";import{U as j,a2 as v}from"./vendor-h1rNnLlo.js";import"./fa-core-DTta3H0z.js";import{T as P}from"./TitleHeader-D1x459NH.js";import{I as h}from"./InfoSection-DHN8bWz7.js";import{R as S}from"./ResponsiveContainer-B-PT5Vru.js";import{B as D}from"./Breadcrumbs-CuetKPDC.js";import{g as T}from"./purchases-pfE0WGRj.js";import{a as B}from"./currency-DT37rhhy.js";import{L as o}from"./ListItem-DQhgI_JI.js";import"./mui-BZDitnBQ.js";import"./firebase-DvdLGwsg.js";import"./fa-light-QiyqI9w_.js";import"./fa-regular-BF4wK1jM.js";import"./fa-solid-T0vWtxZN.js";import"./fa-thin-Cy70rT-_.js";const L=e=>{const{t:i}=j();return[{first:!0,text:i("receipts")},{text:e??""}]},R=({purchase:e})=>{var x,d;const{t:i}=j();return t.jsxs(n,{gap:"x2",children:[t.jsx(s,{typography:"label-bold",children:i("theMail")}),t.jsxs(n,{gap:"x6",hasBorder:!0,p:"x4",children:[t.jsxs(n,{py:"x2",children:[t.jsxs(n,{children:[t.jsxs(l,{justifyContent:"space-between",alignItems:"center",mb:"x2",children:[t.jsx(s,{typography:"body-bold",children:"Miss"}),t.jsx(s,{typography:"caption-regular",children:"Miss"})]}),t.jsxs(l,{justifyContent:"space-between",alignItems:"center",children:[t.jsx(s,{textColor:"color-primary",typography:"body-bold",children:"Miss"}),t.jsx(s,{typography:"heading-6",children:"Miss"})]}),t.jsx(s,{textColor:"secondary",typography:"body-regular",children:"Miss"}),t.jsx(s,{textColor:"primary",typography:"caption-regular",children:"Miss"}),t.jsxs(n,{py:"x2",children:[t.jsxs(s,{textColor:"secondary",typography:"caption-regular",children:[i("services"),":"]}),t.jsx(s,{textColor:"primary",typography:"caption-regular",children:"Miss"})]})]}),t.jsx(u,{})]}),t.jsxs(n,{children:[t.jsxs(n,{gap:"x2",py:"x2",children:[t.jsxs(l,{alignItems:"center",justifyContent:"space-between",children:[t.jsx(s,{textColor:"primary",typography:"body-bold",children:i("purchase")}),t.jsx(s,{typography:"caption-regular",children:"Miss"})]}),t.jsxs(l,{alignItems:"center",justifyContent:"space-between",children:[t.jsx(s,{textColor:"primary",typography:"body-bold",children:"Miss"}),t.jsx(s,{typography:"heading-6",children:"Miss"})]})]}),t.jsx(u,{})]}),t.jsxs(l,{justifyContent:"space-between",alignItems:"center",children:[t.jsx(s,{textColor:"secondary",typography:"label-bold",children:i("total")}),t.jsxs(s,{textColor:"color-accent",typography:"heading-3",children:[((x=e==null?void 0:e.totalPaymentAmount)==null?void 0:x.grossValue)||0,B((d=e==null?void 0:e.totalPaymentAmount)==null?void 0:d.currency)]})]})]})]})},Y=()=>{var m,g;const{t:e}=j(),{id:i}=C(),x=v(I.language),[d,y]=p.useState(!1),[r,f]=p.useState(),b=L(e("invoice")),a=p.useMemo(()=>{var c;if(r!=null&&r.payments&&((c=r==null?void 0:r.payments)==null?void 0:c.length)>0)return r.payments[0]},[r]);p.useEffect(()=>{M()},[x,i]);const M=async()=>{try{if(!i)return;y(!0);const c=await T(i);f(c),y(!1)}catch{y(!1)}};return t.jsxs(S,{wFull:!0,children:[t.jsx(D,{items:b}),d&&t.jsx(l,{justifyContent:"center",alignItems:"center",children:t.jsx($,{})}),t.jsx(P,{subtitle:w(r==null?void 0:r.createdAt),title:e("theInvoice")}),t.jsxs(n,{gap:"x2",children:[t.jsxs(h,{title:e("generally"),children:[t.jsx(o,{title:`${e("to")}:`,text:((g=(m=a==null?void 0:a.paymentMedia)==null?void 0:m.sepaDd)==null?void 0:g.creditorName)||"-"}),t.jsx(o,{title:`${e("address")}:`,text:"Miss"}),t.jsx(o,{title:`${e("city")}:`,text:"Miss"}),t.jsx(o,{showDivider:!1,title:`${e("postcode")}:`,text:"Miss"})]}),t.jsxs(h,{title:e("pay"),children:[t.jsx(o,{title:`${e("paymentMethod")}:`,text:a==null?void 0:a.paymentMethodName}),t.jsx(o,{title:`${e("accountHolder")}:`,text:"Miss"}),t.jsx(o,{title:`${e("iban")}:`,text:"Miss"}),t.jsx(o,{showDivider:!1,title:`${e("bic")}:`,text:"Miss"})]}),t.jsxs(h,{title:e("detail"),children:[t.jsx(o,{title:`${e("status")}:`,text:e(`paymentStatus.${a==null?void 0:a.paymentStatus}`)}),t.jsx(o,{title:`${e("invoiceNumber")}:`,text:"Miss"}),t.jsx(o,{showDivider:!1,title:`${e("billingPeriod")}:`,text:"Miss"})]})]}),t.jsx(R,{purchase:r})]})};export{Y as PurchaseDetail};
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.