1import{j as e}from"./vendor-data-Z5doMMu-.js";import{r as f}from"./vendor-react-zNM0AU50.js";import{s as _}from"./settingsService-BWi-XAI3.js";import{s as S}from"./storageService-HxVmCucr.js";import{a7 as x,_ as U,bk as G,ai as F,a8 as C,bl as M,ae as D,n as R,ak as A,an as T,i as L,aa as w,T as k,ad as P,f as E}from"./vendor-ui-CW5bJ11U.js";import"./vendor-firebase-Da9KY1q_.js";import"./index-D1K3lVhu.js";import"./vendor-charts-08G1rM8P.js";const B={name:"",position:"ë´ì목ì¬",photoUrl:"",greeting:""},Y={mission:"",visionText:"",yearMottoYear:new Date().getFullYear().toString(),yearMotto:"",declaration:"",communities:[]},z=[{category:"주ì¼ìë°°",services:[{name:"",time:"",location:""}]},{category:"주ì¤ìë°°",services:[{name:"",time:"",location:""}]},{category:"êµííêµ",services:[{name:"",time:"",location:""}]}];function ee(){const[t,c]=f.useState(!0),[h,p]=f.useState(!1),[v,u]=f.useState("church"),[r,g]=f.useState({church_name:"",church_name_en:"",phone:"",fax:"",email:"",website:"",address:"",address_detail:"",postal_code:"",logo_url:"",banner_image_url:"",youtube_url:"",facebook_url:"",instagram_url:"",motto_year:new Date().getFullYear().toString(),motto_text:"",worship_schedule:[],updated_by:"admin"}),[n,a]=f.useState({pastorGreeting:{...B},vision:{...Y},history:[],worshipSchedule:z.map(m=>({...m,services:m.services.map(j=>({...j}))})),updated_at:"",updated_by:"admin"});f.useEffect(()=>{o()},[]);async function o(){try{c(!0);const[m,j]=await Promise.all([_.getChurchSettings(),_.getChurchIntro()]);m&&g(m),j&&a(j)}catch(m){console.error("ì¤ì ë¡ë© ì¤í¨:",m),x.error("ì¤ì ì ë¶ë¬ì¬ ì ììµëë¤")}finally{c(!1)}}async function l(){try{p(!0),await _.saveChurchSettings(r),x.success("êµí ì ë³´ê° ì ì¥ëììµëë¤")}catch{x.error("ì ì¥ì ì¤í¨íìµëë¤")}finally{p(!1)}}async function s(){try{p(!0),await _.saveChurchIntro(n),x.success("êµíìê°ê° ì ì¥ëììµëë¤")}catch{x.error("ì ì¥ì ì¤í¨íìµëë¤")}finally{p(!1)}}async function i(m){var y;const j=(y=m.target.files)==null?void 0:y[0];if(j)try{x.loading("ë¡ê³ 를 ì
ë¡ëíë ì¤...");const N=await S.uploadBannerImage(j);g({...r,logo_url:N}),x.dismiss(),x.success("ë¡ê³ ê° ì
ë¡ëëììµëë¤")}catch{x.dismiss(),x.error("ì
ë¡ëì ì¤í¨íìµëë¤")}}async function d(m){var y;const j=(y=m.target.files)==null?void 0:y[0];if(j)try{x.loading("ë°°ë를 ì
ë¡ëíë ì¤...");const N=await S.uploadBannerImage(j);g({...r,banner_image_url:N}),x.dismiss(),x.success("ë°°ëê° ì
ë¡ëëììµëë¤")}catch{x.dismiss(),x.error("ì
ë¡ëì ì¤í¨íìµëë¤")}}async function b(m){var y;const j=(y=m.target.files)==null?void 0:y[0];if(j)try{x.loading("ì¬ì§ì ì
ë¡ëíë ì¤...");const N=await S.uploadBannerImage(j);a({...n,pastorGreeting:{...n.pastorGreeting,photoUrl:N}}),x.dismiss(),x.success("ì¬ì§ì´ ì
ë¡ëëììµëë¤")}catch{x.dismiss(),x.error("ì
ë¡ëì ì¤í¨íìµëë¤")}}return t?e.jsx("div",{className:"flex items-center justify-center h-96",children:e.jsx("div",{className:"text-gray-500 text-[13px]",children:"ì¤ì ì ë¶ë¬ì¤ë ì¤..."})}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-[18px] font-bold text-gray-900 flex items-center gap-2",children:[e.jsx(U,{className:"w-5 h-5 text-blue-600"}),"êµíì¤ì "]}),e.jsx("p",{className:"text-[12px] text-gray-500 mt-1",children:"êµí ì ë³´ ë° êµíìê° ì½í
ì¸ ë¥¼ ê´ë¦¬í©ëë¤"})]}),e.jsxs("div",{className:"bg-white border border-gray-200 rounded shadow-sm",children:[e.jsxs("div",{className:"flex border-b border-gray-200",children:[e.jsxs("button",{onClick:()=>u("church"),className:`flex-1 px-4 py-3 text-[13px] font-medium transition-colors ${v==="church"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-900"}`,children:[e.jsx(G,{className:"w-4 h-4 inline mr-2"}),"êµí ì ë³´"]}),e.jsxs("button",{onClick:()=>u("intro"),className:`flex-1 px-4 py-3 text-[13px] font-medium transition-colors ${v==="intro"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-900"}`,children:[e.jsx(U,{className:"w-4 h-4 inline mr-2"}),"êµíìê°"]})]}),e.jsx("div",{className:"p-6",children:v==="church"?e.jsx(H,{settings:r,onChange:g,onLogoUpload:i,onBannerUpload:d,onSave:l,saving:h}):e.jsx(O,{intro:n,onChange:a,onPastorPhotoUpload:b,onSave:s,saving:h})})]})]})}
1function H({settings:t,onChange:c,onLogoUpload:h,onBannerUpload:p,onSave:v,saving:u}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h3",{className:"text-[14px] font-bold text-gray-900 flex items-center gap-2",children:[e.jsx(G,{className:"w-4 h-4"})," 기본 ì ë³´"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:["êµíëª
",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:t.church_name,onChange:r=>c({...t,church_name:r.target.value}),className:"compact-input",placeholder:"ìëêµí"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"êµíëª
(ì문)"}),e.jsx("input",{type:"text",value:t.church_name_en,onChange:r=>c({...t,church_name_en:r.target.value}),className:"compact-input",placeholder:"Seodoon Church"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:["ì íë²í¸ ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"tel",value:t.phone,onChange:r=>c({...t,phone:r.target.value}),className:"compact-input",placeholder:"031-123-4567"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"í©ì¤"}),e.jsx("input",{type:"tel",value:t.fax,onChange:r=>c({...t,fax:r.target.value}),className:"compact-input",placeholder:"031-123-4568"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:["ì´ë©ì¼ ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"email",value:t.email,onChange:r=>c({...t,email:r.target.value}),className:"compact-input",placeholder:"[email protected]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ííì´ì§"}),e.jsx("input",{type:"url",value:t.website,onChange:r=>c({...t,website:r.target.value}),className:"compact-input",placeholder:"https://church.com"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h3",{className:"text-[14px] font-bold text-gray-900 flex items-center gap-2",children:[e.jsx(F,{className:"w-4 h-4"})," 주ì"]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:["기본 주ì ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:t.address,onChange:r=>c({...t,address:r.target.value}),className:"compact-input",placeholder:"경기ë íì±ì ..."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ìì¸ ì£¼ì"}),e.jsx("input",{type:"text",value:t.address_detail,onChange:r=>c({...t,address_detail:r.target.value}),className:"compact-input"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ì°í¸ë²í¸"}),e.jsx("input",{type:"text",value:t.postal_code,onChange:r=>c({...t,postal_code:r.target.value}),className:"compact-input",placeholder:"12345"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h3",{className:"text-[14px] font-bold text-gray-900 flex items-center gap-2",children:[e.jsx(C,{className:"w-4 h-4"})," ì´ë¯¸ì§"]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"êµí ë¡ê³ "}),t.logo_url&&e.jsx("img",{src:t.logo_url,alt:"ë¡ê³ ",className:"w-32 h-32 object-contain bg-gray-50 rounded mb-2"}),e.jsxs("label",{className:"flex items-center justify-center gap-2 px-4 py-2 border-2 border-dashed border-gray-300 rounded hover:border-blue-600 cursor-pointer transition-colors",children:[e.jsx(C,{className:"w-4 h-4 text-gray-400"}),e.jsx("span",{className:"text-[13px] text-gray-600",children:"ë¡ê³ ì
ë¡ë"}),e.jsx("input",{type:"file",accept:"image/*",onChange:h,className:"hidden"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ë©ì¸ ë°°ë"}),t.banner_image_url&&e.jsx("img",{src:t.banner_image_url,alt:"ë°°ë",className:"w-full h-32 object-cover bg-gray-50 rounded mb-2"}),e.jsxs("label",{className:"flex items-center justify-center gap-2 px-4 py-2 border-2 border-dashed border-gray-300 rounded hover:border-blue-600 cursor-pointer transition-colors",children:[e.jsx(C,{className:"w-4 h-4 text-gray-400"}),e.jsx("span",{className:"text-[13px] text-gray-600",children:"ë°°ë ì
ë¡ë"}),e.jsx("input",{type:"file",accept:"image/*",onChange:p,className:"hidden"})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h3",{className:"text-[14px] font-bold text-gray-900 flex items-center gap-2",children:[e.jsx(M,{className:"w-4 h-4"})," ìì
미ëì´"]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ì íë¸ URL"}),e.jsx("input",{type:"url",value:t.youtube_url,onChange:r=>c({...t,youtube_url:r.target.value}),className:"compact-input"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"íì´ì¤ë¶ URL"}),e.jsx("input",{type:"url",value:t.facebook_url,onChange:r=>c({...t,facebook_url:r.target.value}),className:"compact-input"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ì¸ì¤íê·¸ë¨ URL"}),e.jsx("input",{type:"url",value:t.instagram_url,onChange:r=>c({...t,instagram_url:r.target.value}),className:"compact-input"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-[14px] font-bold text-gray-900",children:"íì´"}),e.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ì°ë"}),e.jsx("input",{type:"text",value:t.motto_year,onChange:r=>c({...t,motto_year:r.target.value}),className:"compact-input",placeholder:"2026"})]}),e.jsxs("div",{className:"col-span-3",children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"íì´ ë¬¸êµ¬"}),e.jsx("input",{type:"text",value:t.motto_text,onChange:r=>c({...t,motto_text:r.target.value}),className:"compact-input"})]})]})]}),e.jsx("div",{className:"pt-4 border-t border-gray-200",children:e.jsxs("button",{onClick:v,disabled:u,className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors text-[13px] font-medium disabled:opacity-50",children:[e.jsx(D,{className:"w-4 h-4"}),u?"ì ì¥ ì¤...":"êµí ì ë³´ ì ì¥"]})})]})}function O({intro:t,onChange:c,onPastorPhotoUpload:h,onSave:p,saving:v}){const[u,r]=f.useState("pastor"),g=(a,o)=>{c({...t,pastorGreeting:{...t.pastorGreeting,[a]:o}})},n=(a,o)=>{c({...t,vision:{...t.vision,[a]:o}})};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex gap-1 bg-gray-100 rounded p-1",children:[{key:"pastor",label:"ë´ìëª©ì¬ ì¸ì¬ë§",icon:R},{key:"vision",label:"êµíë¹ì ",icon:A},{key:"history",label:"êµíì°í",icon:T},{key:"worship",label:"ìë°°ìê°",icon:L}].map(({key:a,label:o,icon:l})=>e.jsxs("button",{onClick:()=>r(a),className:`flex-1 flex items-center justify-center gap-1.5 px-3 py-2 rounded text-[12px] font-medium transition-colors ${u===a?"bg-white text-blue-600 shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:[e.jsx(l,{className:"w-3.5 h-3.5"}),o]},a))}),u==="pastor"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:["ì´ë¦ ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:t.pastorGreeting.name,onChange:a=>g("name",a.target.value),className:"compact-input",placeholder:"ê¹ìí"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ì§ë¶"}),e.jsx("input",{type:"text",value:t.pastorGreeting.position,onChange:a=>g("position",a.target.value),className:"compact-input",placeholder:"ë´ì목ì¬"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ì¬ì§"}),e.jsxs("div",{className:"flex items-start gap-4",children:[t.pastorGreeting.photoUrl&&e.jsx("img",{src:t.pastorGreeting.photoUrl,alt:"목ì¬ë ì¬ì§",className:"w-24 h-32 object-cover rounded border border-gray-200"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("label",{className:"flex items-center justify-center gap-2 px-4 py-3 border-2 border-dashed border-gray-300 rounded hover:border-blue-600 cursor-pointer transition-colors",children:[e.jsx(C,{className:"w-4 h-4 text-gray-400"}),e.jsx("span",{className:"text-[13px] text-gray-600",children:"ì¬ì§ ì
ë¡ë"}),e.jsx("input",{type:"file",accept:"image/*",onChange:h,className:"hidden"})]}),e.jsx("p",{className:"text-[11px] text-gray-400 mt-1",children:"ëë URL ì§ì ì
ë ¥:"}),e.jsx("input",{type:"url",value:t.pastorGreeting.photoUrl,onChange:a=>g("photoUrl",a.target.value),className:"compact-input mt-1",placeholder:"https://..."})]})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:["ì¸ì¬ë§ ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("textarea",{value:t.pastorGreeting.greeting,onChange:a=>g("greeting",a.target.value),className:"compact-input min-h-[200px] resize-y",placeholder:"ë´ì목ì¬ì ì¸ì¬ë§ì ìì±í©ëë¤. ì¤ë°ê¿ì ì¬ì©íì¬ ë¨ë½ì 구ë¶í ì ììµëë¤."}),e.jsx("p",{className:"text-[11px] text-gray-400 mt-1",children:"ì¤ë°ê¿ì¼ë¡ ë¨ë½ 구ë¶"})]})]}),u==="vision"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:["미ì
(ì¬ëª
) ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:t.vision.mission,onChange:a=>n("mission",a.target.value),className:"compact-input",placeholder:"ë§ìì´ ê·¸ëë¡ ì¶ì´ ëë êµí"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:["ë¹ì ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:t.vision.visionText,onChange:a=>n("visionText",a.target.value),className:"compact-input",placeholder:"ë¤ì ì´ìë ì´ë¦¬ë ì êµì ì ì ê³µëì²´"})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"íì´ ì°ë"}),e.jsx("input",{type:"text",value:t.vision.yearMottoYear,onChange:a=>n("yearMottoYear",a.target.value),className:"compact-input",placeholder:"2026"})]}),e.jsxs("div",{className:"col-span-3",children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ì°ê° íì´"}),e.jsx("input",{type:"text",value:t.vision.yearMotto,onChange:a=>n("yearMotto",a.target.value),className:"compact-input",placeholder:"ì¼ì´ë ë¹ì ë°íë¼(ì¬60:1)"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ë¹ì ì ì¸ë¬¸"}),e.jsx("textarea",{value:t.vision.declaration,onChange:a=>n("declaration",a.target.value),className:"compact-input min-h-[120px] resize-y",placeholder:"êµíì ë¹ì ì ì¸ë¬¸ì ìì±í©ëë¤."})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-[12px] font-medium text-gray-700",children:"ê³µëì²´ ìê°"}),e.jsxs("button",{onClick:()=>n("communities",[...t.vision.communities,{title:"",description:""}]),className:"flex items-center gap-1 text-[11px] text-blue-600 hover:text-blue-700",children:[e.jsx(w,{className:"w-3 h-3"})," ì¶ê°"]})]}),e.jsxs("div",{className:"space-y-2",children:[t.vision.communities.map((a,o)=>e.jsxs("div",{className:"flex gap-2 items-start p-3 bg-gray-50 rounded border border-gray-200",children:[e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("input",{type:"text",value:a.title,onChange:l=>{const s=[...t.vision.communities];s[o]={...s[o],title:l.target.value},n("communities",s)},className:"compact-input",placeholder:"ê³µëì²´ ì´ë¦ (ì: ìë°° ê³µëì²´)"}),e.jsx("textarea",{value:a.description,onChange:l=>{const s=[...t.vision.communities];s[o]={...s[o],description:l.target.value},n("communities",s)}
1,className:"compact-input min-h-[60px] resize-y",placeholder:"ì¤ëª
"})]}),e.jsx("button",{onClick:()=>{const l=t.vision.communities.filter((s,i)=>i!==o);n("communities",l)},className:"p-1.5 text-red-400 hover:text-red-600 hover:bg-red-50 rounded",children:e.jsx(k,{className:"w-3.5 h-3.5"})})]},o)),t.vision.communities.length===0&&e.jsx("p",{className:"text-[11px] text-gray-400 text-center py-4",children:"ê³µëì²´ ìê°ë¥¼ ì¶ê°í´ì£¼ì¸ì"})]})]})]}),u==="history"&&e.jsx($,{history:t.history,onChange:a=>c({...t,history:a})}),u==="worship"&&e.jsx(V,{schedule:t.worshipSchedule,onChange:a=>c({...t,worshipSchedule:a})}),e.jsx("div",{className:"pt-4 border-t border-gray-200",children:e.jsxs("button",{onClick:p,disabled:v,className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors text-[13px] font-medium disabled:opacity-50",children:[e.jsx(D,{className:"w-4 h-4"}),v?"ì ì¥ ì¤...":"êµíìê° ì ì¥"]})})]})}function $({history:t,onChange:c}){const[h,p]=f.useState(null);function v(){c([...t,{decade:"",description:"",events:[]}]),p(t.length)}function u(l){confirm("ì´ ì°ë를 ìì íìê² ìµëê¹?")&&(c(t.filter((s,i)=>i!==l)),h===l&&p(null))}function r(l,s,i){const d=[...t];d[l]={...d[l],[s]:i},c(d)}function g(l){const s=[...t];s[l]={...s[l],events:[...s[l].events,{date:"",content:""}]},c(s)}function n(l,s,i,d){const b=[...t],m=[...b[l].events];m[s]={...m[s],[i]:d},b[l]={...b[l],events:m},c(b)}function a(l,s){const i=[...t];i[l]={...i[l],events:i[l].events.filter((d,b)=>b!==s)},c(i)}function o(l,s){const i=s==="up"?l-1:l+1;if(i<0||i>=t.length)return;const d=[...t];[d[l],d[i]]=[d[i],d[l]],c(d),p(i)}return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-[11px] text-gray-500",children:"ì°ëë³ êµí ìì¬ë¥¼ ê´ë¦¬í©ëë¤. ì ì¬ê±´ì ì¶ê°íë©´ ííì´ì§ì ìë ë°ìë©ëë¤."}),e.jsxs("button",{onClick:v,className:"flex items-center gap-1 px-3 py-1.5 text-[12px] text-white bg-blue-600 rounded hover:bg-blue-700 transition-colors",children:[e.jsx(w,{className:"w-3 h-3"})," ì°ë ì¶ê°"]})]}),t.length===0&&e.jsx("div",{className:"text-center py-8 text-gray-400 text-[13px]",children:'ì°íì´ ììµëë¤. "ì°ë ì¶ê°" ë²í¼ì ëë¬ ììíì¸ì.'}),t.map((l,s)=>e.jsxs("div",{className:"border border-gray-200 rounded overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-gray-50 cursor-pointer hover:bg-gray-100 transition-colors",onClick:()=>p(h===s?null:s),children:[e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:i=>{i.stopPropagation(),o(s,"up")},disabled:s===0,className:"p-0.5 text-gray-400 hover:text-gray-600 disabled:opacity-30",children:e.jsx(P,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:i=>{i.stopPropagation(),o(s,"down")},disabled:s===t.length-1,className:"p-0.5 text-gray-400 hover:text-gray-600 disabled:opacity-30",children:e.jsx(E,{className:"w-3.5 h-3.5"})})]}),e.jsx(T,{className:"w-4 h-4 text-blue-600"}),e.jsxs("span",{className:"text-[13px] font-bold text-gray-900 flex-1",children:[l.decade||"(ì°ë 미ì
ë ¥)",l.description&&e.jsxs("span",{className:"font-normal text-gray-500 ml-2",children:["- ",l.description]})]}),e.jsxs("span",{className:"text-[11px] text-gray-400",children:[l.events.length,"ê° ì¬ê±´"]}),e.jsx("button",{onClick:i=>{i.stopPropagation(),u(s)},className:"p-1 text-red-400 hover:text-red-600 hover:bg-red-50 rounded",children:e.jsx(k,{className:"w-3.5 h-3.5"})}),h===s?e.jsx(P,{className:"w-4 h-4 text-gray-400"}):e.jsx(E,{className:"w-4 h-4 text-gray-400"})]}),h===s&&e.jsxs("div",{className:"p-4 space-y-3 border-t border-gray-200",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] font-medium text-gray-600 mb-1",children:"ì°ëëª
"}),e.jsx("input",{type:"text",value:l.decade,onChange:i=>r(s,"decade",i.target.value),className:"compact-input",placeholder:"1950ë
ë"})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx("label",{className:"block text-[11px] font-medium text-gray-600 mb-1",children:"ìë ì¤ëª
"}),e.jsx("input",{type:"text",value:l.description,onChange:i=>r(s,"description",i.target.value),className:"compact-input",placeholder:"êµí ì¤ë¦½ê³¼ ì´
1기 ë°ì "})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-[11px] font-medium text-gray-600",children:"ì¬ê±´ 목ë¡"}),e.jsxs("button",{onClick:()=>g(s),className:"flex items-center gap-1 text-[11px] text-blue-600 hover:text-blue-700",children:[e.jsx(w,{className:"w-3 h-3"})," ì¬ê±´ ì¶ê°"]})]}),e.jsxs("div",{className:"space-y-1.5",children:[l.events.map((i,d)=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx("input",{type:"text",value:i.date,onChange:b=>n(s,d,"date",b.target.value),className:"compact-input w-[140px] flex-shrink-0",placeholder:"1953. 09. 23"}),e.jsx("input",{type:"text",value:i.content,onChange:b=>n(s,d,"content",b.target.value),className:"compact-input flex-1",placeholder:"ì¬ê±´ ë´ì©"}),e.jsx("button",{onClick:()=>a(s,d),className:"p-1 text-red-400 hover:text-red-600 hover:bg-red-50 rounded flex-shrink-0",children:e.jsx(k,{className:"w-3 h-3"})})]},d)),l.events.length===0&&e.jsx("p",{className:"text-[11px] text-gray-400 text-center py-3",children:"ì¬ê±´ì ì¶ê°í´ì£¼ì¸ì"})]})]})]})]},s))]})}function V({schedule:t,onChange:c}){function h(){c([...t,{category:"",services:[{name:"",time:"",location:""}]}])}function p(n){confirm("ì´ ì¹´í
ê³ ë¦¬ë¥¼ ìì íìê² ìµëê¹?")&&c(t.filter((a,o)=>o!==n))}function v(n,a){const o=[...t];o[n]={...o[n],category:a},c(o)}function u(n){const a=[...t];a[n]={...a[n],services:[...a[n].services,{name:"",time:"",location:""}]},c(a)}function r(n,a,o,l){const s=[...t],i=[...s[n].services];i[a]={...i[a],[o]:l},s[n]={...s[n],services:i},c(s)}function g(n,a){const o=[...t];o[n]={...o[n],services:o[n].services.filter((l,s)=>s!==a)},c(o)}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-[11px] text-gray-500",children:"ì¹´í
ê³ ë¦¬ë³ ìë°° ìê°ì ê´ë¦¬í©ëë¤."}),e.jsxs("button",{onClick:h,className:"flex items-center gap-1 px-3 py-1.5 text-[12px] text-white bg-blue-600 rounded hover:bg-blue-700 transition-colors",children:[e.jsx(w,{className:"w-3 h-3"})," ì¹´í
ê³ ë¦¬ ì¶ê°"]})]}),t.map((n,a)=>e.jsxs("div",{className:"border border-gray-200 rounded p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{className:"w-4 h-4 text-blue-600"}),e.jsx("input",{type:"text",value:n.category,onChange:o=>v(a,o.target.value),className:"compact-input flex-1 font-bold",placeholder:"ì¹´í
ê³ ë¦¬ëª
(ì: 주ì¼ìë°°)"}),e.jsx("button",{onClick:()=>p(a),className:"p-1.5 text-red-400 hover:text-red-600 hover:bg-red-50 rounded",children:e.jsx(k,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex gap-2 text-[10px] font-medium text-gray-400 uppercase px-1",children:[e.jsx("span",{className:"flex-1",children:"ìë°°ëª
"}),e.jsx("span",{className:"w-[120px]",children:"ìê°"}),e.jsx("span",{className:"w-[120px]",children:"ì¥ì"}),e.jsx("span",{className:"w-[28px]"})]}),n.services.map((o,l)=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx("input",{type:"text",value:o.name,onChange:s=>r(a,l,"name",s.target.value),className:"compact-input flex-1",placeholder:"1ë¶ ìë°°"}),e.jsx("input",{type:"text",value:o.time,onChange:s=>r(a,l,"time",s.target.value),className:"compact-input w-[120px]",placeholder:"ì¤ì 7:30"}),e.jsx("input",{type:"text",value:o.location,onChange:s=>r(a,l,"location",s.target.value),className:"compact-input w-[120px]",placeholder:"본ë¹"}),e.jsx("button",{onClick:()=>g(a,l),className:"p-1 text-red-400 hover:text-red-600 hover:bg-red-50 rounded flex-shrink-0",children:e.jsx(k,{className:"w-3 h-3"})})]},l))]}),e.jsxs("button",{onClick:()=>u(a),className:"flex items-center gap-1 text-[11px] text-blue-600 hover:text-blue-700",children:[e.jsx(w,{className:"w-3 h-3"})," ìë°° ì¶ê°"]})]},a)),t.length===0&&e.jsx("div",{className:"text-center py-8 text-gray-400 text-[13px]",children:"ìë°° ì¹´í
ê³ ë¦¬ë¥¼ ì¶ê°í´ì£¼ì¸ì."})]})}export{ee as ChurchSettingsPage};
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.