1import{j as e,L as w,s as N,bk as y}from"./vendor-ui-fc56ca80.js";import{e as L,r as o}from"./vendor-react-f9ccc48d.js";import{h as C,B as x,t as k,am as M}from"./index-90016d22.js";import{A as S,a3 as v}from"./counselingService-1621b37c.js";import{C as E}from"./CasePrint-f8230d14.js";import{u as A,f as T,L as z}from"./vendor-utils-323b9898.js";import"./vendor-firebase-a557f106.js";import"./vendor-charts-9af8b7c0.js";const F=["what","why","who","howLong","rights","ai"],q=()=>{const{t,i18n:p}=A("counseling"),h=L(),{userData:i,churchData:s}=C(),m=i==null?void 0:i.churchId,l=p.language.startsWith("en"),f=l?"MMMM d, yyyy":"d 'de' MMMM 'de' yyyy",[n,u]=o.useState(null),[j,c]=o.useState(!0),d=o.useCallback(async()=>{if(!m){c(!1);return}try{u(await S(m))}finally{c(!1)}},[m]);if(o.useEffect(()=>{d()},[d]),j)return e.jsxs("div",{className:"flex items-center justify-center py-16 text-muted-foreground",children:[e.jsx(w,{className:"h-5 w-5 animate-spin mr-2"}),"â¦"]});const a=n!=null&&n.retention?v(n.retention):null,b=!!a&&a.mode!=="retain",g=T(new Date,f,{locale:l?z:M});return e.jsxs("div",{className:"case-print p-4 md:p-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 mb-4 print:hidden",children:[e.jsxs(x,{variant:"ghost",size:"sm",onClick:()=>h("/app/consejeria/configuracion"),children:[e.jsx(N,{className:"h-4 w-4 mr-2"}),t("ministry.title")]}),e.jsxs(x,{size:"sm",onClick:()=>window.print(),children:[e.jsx(y,{className:"h-4 w-4 mr-2"}),t("print.action")]})]}),e.jsxs(k,{className:"print-sheet print-plain mx-auto p-8",children:[e.jsxs("header",{className:"print-header border-b border-border pb-4 mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 mb-4",children:[s!=null&&s.logoUrl?e.jsx(E,{src:s.logoUrl,alt:(s==null?void 0:s.name)??"",className:"print-logo h-14 w-auto max-w-[240px] object-contain object-left"}):e.jsx("p",{className:"text-sm font-semibold uppercase tracking-wide",children:(s==null?void 0:s.name)??""}),e.jsx("p",{className:"text-xs text-muted-foreground whitespace-nowrap",children:g})]}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:t("statement.title")})]}),e.jsx("p",{className:"print-intro text-sm text-muted-foreground mb-6",children:t("statement.intro")}),F.map(r=>e.jsxs("section",{className:"print-block mb-5",children:[e.jsx("h2",{className:"text-sm font-semibold mb-1",children:t(`statement.${r}.title`)}),e.jsx("p",{className:"text-sm whitespace-pre-line",children:r==="howLong"?b?t(`statement.howLong.${a.mode}`,{days:a.daysAfterClose}):t("statement.howLong.retain"):t(`statement.${r}.body`)})]},r)),(n==null?void 0:n.ministryFrameworkText)&&e.jsxs("section",{className:"print-block mb-5",children:[e.jsx("h2",{className:"text-sm font-semibold mb-1",children:t("statement.framework")}),e.jsx("p",{className:"text-sm whitespace-pre-line",children:n.ministryFrameworkText})]}),e.jsx("p",{className:"text-xs text-muted-foreground border-t border-border pt-4 mt-6",children:t("statement.footer")})]})]})};export{q as DataStatementPage,q as default};
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.