1import{r as l,v as y,j as t,G as b,aa as f,a9 as k}from"./index-DUpygkxg.js";import{c as j,d as N}from"./financialStatements-BtiKByHh.js";import{A as v}from"./AccountingTabBar-BNeW0zw8.js";import"./firebase-eOymXQZD.js";const u={accountingPolicies:"",plByProject:"",restrictedDonations:"",fixedAssetChanges:"",otherNotes:""},w=[{key:"accountingPolicies",number:1,title:"éè¦ãªä¼è¨æ¹éã®æ³¨è¨",placeholder:`1. åºå®è³ç£ã®æ¸ä¾¡åå´ã®æ¹æ³ 2 æå½¢åºå®è³ç£â¦å®é¡æ³ã«ãã£ã¦ããã 3 42. æ¶è²»ç¨çã®ä¼è¨å¦ç 5 æ¶è²»ç¨çã®ä¼è¨å¦çã¯ãç¨è¾¼æ¹å¼ã«ãã£ã¦ããã`},{key:"plByProject",number:2,title:"äºæ¥å¥æçã®ç¶æ³",placeholder:`彿³äººã¯ä¸»ããäºæ¥ã¨ãã¦ä»¥ä¸ã®äºæ¥ã宿½ãã¦ããã 6 7(1) åã©ãèªç¶ä½é¨äºæ¥ 8 åç: ââå è²»ç¨: ââå 9 10(2) éå±±æ´åäºæ¥ 11 åç: ââå è²»ç¨: ââå`},{key:"restrictedDonations",number:3,title:"使éå¶ç´ã®ããå¯ä»çã®å 訳",placeholder:`使éçãå¶ç´ãããå¯ä»éçã®å 訳ã¯ä»¥ä¸ã®ã¨ããã§ããã 12 13ï¼è©²å½ãªãï¼ 14 15ã¾ãã¯: 16å¯ä»è : ââè²¡å£ éé¡: ââå 使éå¶ç´ã®å 容: ââäºæ¥ã«ä½¿ç¨ãããã¨`},{key:"fixedAssetChanges",number:4,title:"åºå®è³ç£ã®å¢æ¸å 訳",placeholder:` åææ«æ®é« 彿å¢å é¡ å½ææ¸å°é¡ å½ææ«æ®é« 17ä»å¨åå ââå ââå ââå ââå 18ã½ããã¦ã§ã¢ ââå ââå ââå ââå 19åè¨ ââå ââå ââå ââå`},{key:"otherNotes",number:5,title:"ãã®ä»ç¹è¨äºé ",placeholder:`ãã®ä»ã財å諸表ãçè§£ããããã«å¿ è¦ãªäºé ãè¨è¼ãã¦ãã ããã 20 21ä¾: 22ã»é¢é£å½äºè ã¨ã®åå¼ã¯ãªãã 23ã»éè¦ãªå¾çºäºè±¡ã¯ãªãã 24ã»ââã«ã¤ãã¦ã®è£è¶³èª¬æ`}];function T(){const[n,x]=l.useState(y()),[i,o]=l.useState({...u}),[g,c]=l.useState(!0),[m,d]=l.useState(!1),a=l.useRef(null);l.useEffect(()=>{let e=!1;return a.current&&(clearTimeout(a.current),a.current=null),(async()=>{c(!0);try{const r=await N(n);if(e)return;o(r?{accountingPolicies:r.accountingPolicies??"",plByProject:r.plByProject??"",restrictedDonations:r.restrictedDonations??"",fixedAssetChanges:r.fixedAssetChanges??"",otherNotes:r.otherNotes??""}:{...u})}catch(r){console.error("注è¨ãã¼ã¿èªã¿è¾¼ã¿ã¨ã©ã¼:",r)}finally{e||c(!1)}})(),()=>{e=!0,a.current&&(clearTimeout(a.current),a.current=null)}},[n]);const p=l.useCallback(e=>{a.current&&clearTimeout(a.current),a.current=setTimeout(async()=>{d(!0);try{const s={...e,fiscalYear:n,updatedAt:new Date().toISOString()};await j(s)}catch(s){console.error("注è¨ä¿åã¨ã©ã¼:",s)}finally{d(!1)}},500)},[n]),h=(e,s)=>{const r={...i,[e]:s};o(r),p(r)};return g?t.jsx(b,{}):t.jsxs("div",{className:"p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4 print:hidden",children:[t.jsxs("h2",{className:"text-xl font-bold dark:text-gray-100",children:["ä¼è¨å¦ç",m&&t.jsx("span",{className:"ml-2 text-xs text-gray-400 dark:text-gray-500 font-normal animate-pulse",children:"ä¿åä¸..."})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("select",{value:n,onChange:e=>x(Number(e.target.value)),className:"px-3 py-1.5 border border-gray-300 dark:border-gray-600 rounded-lg text-sm dark:bg-gray-800 dark:text-gray-100",children:f(5).map(e=>t.jsxs("option",{value:e,children:[e,"年度"]},e))}),t.jsx("button",{onClick:()=>window.print(),className:"px-4 py-2 bg-teal-600 text-white text-sm rounded-lg hover:bg-teal-700 transition-colors",children:"å°å·"})]})]}),t.jsx(v,{activeTab:"notes"}),t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-xl shadow-sm dark:shadow-black/20 overflow-hidden print:shadow-none",children:[t.jsxs("div",{className:"px-8 py-6 border-b dark:border-gray-700 text-center",children:[t.jsx("h1",{className:"text-lg font-bold dark:text-gray-100 mb-1",children:"財åè«¸è¡¨ã®æ³¨è¨"}),t.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["èª ",n,"å¹´4æ1æ¥ è³ ",n+1,"å¹´3æ31æ¥"]}),t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:k.name})]}),t.jsx("div",{className:"px-8 py-6 space-y-6",children:w.map(e=>t.jsxs("div",{children:[t.jsxs("h2",{className:"font-bold text-sm mb-2 border-b dark:border-gray-700 pb-1 dark:text-gray-100",children:[e.number,". ",e.title]}),t.jsx("textarea",{value:i[e.key],onChange:s=>h(e.key,s.target.value),placeholder:e.placeholder,className:"w-full border border-gray-200 dark:border-gray-700 rounded-lg p-4 min-h-[140px] text-sm focus:outline-none focus:ring-2 focus:ring-teal-500 focus:border-transparent resize-y placeholder:text-gray-400 dark:placeholder:text-gray-600 dark:bg-gray-800 dark:text-gray-100 print:border-none print:p-0 print:min-h-0 print:resize-none"})]},e.key))}),t.jsx("div",{className:"p-3 text-xs text-gray-400 dark:text-gray-500 text-center border-t dark:border-gray-700 print:hidden",children:"å ¥åå 容ã¯Firestoreã«èªåä¿åãã
24ã¾ãï¼500msé
å»¶ï¼"})]})]})}export{T 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.