1import{j as e}from"./vendor-data-Z5doMMu-.js";import{r as o}from"./vendor-react-zNM0AU50.js";import{m as oe,l as de,j as xe,k as S,K as q,u as B}from"./vendor-firebase-Da9KY1q_.js";import{D as L,u as me,i as pe,R as j,d as N,j as z,k as ue,l as F,n as he}from"./index-D1K3lVhu.js";import{a7 as u,U as ge,bm as T,d as be,n as K,E as V,T as ye,X as W,ae as Z,az as X,ak as H,bn as J,g as fe,a as je,j as Ne,S as ee,bk as ve,bl as we,B as ke,bo as Se}from"./vendor-ui-CW5bJ11U.js";import{s as Y}from"./settingsService-BWi-XAI3.js";import"./vendor-charts-08G1rM8P.js";function _e(){const[x,y]=o.useState([]),[E,_]=o.useState(L),[n,h]=o.useState(!0),[$,A]=o.useState(!1),[O,P]=o.useState("roles"),[v,R]=o.useState(""),[g,M]=o.useState(null),[D,t]=o.useState(!1),[b,f]=o.useState(null),{user:m}=me(),p=(m==null?void 0:m.role)==="ìµê³ ê´ë¦¬ì"?"super_admin":"admin",w=(m==null?void 0:m.role)==="ìµê³ ê´ë¦¬ì",Q=pe(p),C=o.useMemo(()=>{const s={};return Object.keys(j).forEach(a=>{s[a]=x.filter(r=>k(r).includes(a))}),s},[x]),se=o.useMemo(()=>x.filter(s=>k(s).length>0).length,[x]),G=o.useMemo(()=>{if(!v.trim()||!b)return[];const s=v.toLowerCase();return x.filter(a=>k(a).includes(b)?!1:a.name.toLowerCase().includes(s)).sort((a,r)=>a.name.localeCompare(r.name,"ko")).slice(0,10)},[x,v,b]);o.useEffect(()=>{te()},[]);function k(s){return s.roles&&s.roles.length>0?s.roles:s.role?[s.role]:[]}async function te(){try{h(!0);const a=(await oe(de(N,"members"))).docs.map(l=>{const c=l.data();return{id:l.id,name:c.name,role:c.role,roles:c.roles}});y(a);const r=await xe(S(N,"system","permissions"));if(r.exists()){const l=r.data(),c={};let i=!1;for(const d of Object.keys(L))l[d]||(i=!0),c[d]={...L[d],...l[d]};if(i)try{await q(S(N,"system","permissions"),c,{merge:!0})}catch(d){console.warn("ê¶í 문ì ë³´ê° ì ì¥ ì¤í¨:",d)}_(c)}else await q(S(N,"system","permissions"),L),_(L)}catch(s){console.error("ë°ì´í° ë¡ë ì¤í¨:",s),u.error("ë°ì´í°ë¥¼ ë¶ë¬ì¤ëë° ì¤í¨íìµëë¤.")}finally{h(!1)}}async function re(s,a){if(!Q.includes(a)){u.error("ì´ ìí ì ë¶ì¬í ê¶íì´ ììµëë¤.");return}try{const r=x.find(i=>i.id===s);if(!r)return;const c=[...k(r),a];await B(S(N,"members",s),{roles:c,role:null,updated_at:new Date().toISOString()}),y(i=>i.map(d=>d.id===s?{...d,roles:c,role:void 0}:d)),u.success(`${r.name}ëìê² ${j[a]} ìí ì ë¶ì¬íìµëë¤.`),R(""),t(!1),f(null)}catch(r){console.error("ìí ë¶ì¬ ì¤í¨:",r),u.error("ìí ë¶ì¬ì ì¤í¨íìµëë¤.")}}async function ae(s,a){try{const r=x.find(i=>i.id===s);if(!r)return;const c=k(r).filter(i=>i!==a);await B(S(N,"members",s),{roles:c,role:null,updated_at:new Date().toISOString()}),u.success(`${r.name}ëì ${j[a]} ìí ì´ ì ê±°ëììµëë¤.`),y(i=>i.map(d=>d.id===s?{...d,roles:c,role:void 0}:d))}catch(r){console.error("ìí ì ê±° ì¤í¨:",r),u.error("ìí ì ê±°ì ì¤í¨íìµëë¤.")}}async function le(s,a){if(confirm(`"${s}" 그룹ì 모ë ìí ì ìì íìê² ìµëê¹? 2í´ë¹ 그룹ì 모ë êµì¸ìê²ì ìí ì´ ì ê±°ë©ëë¤.`))try{let r=0;for(const l of a){const c=C[l];for(const i of c){const U=k(i).filter(ie=>ie!==l);await B(S(N,"members",i.id),{roles:U,role:null,updated_at:new Date().toISOString()}),r++}}y(l=>l.map(c=>{const d=k(c).filter(U=>!a.includes(U));return{...c,roles:d,role:void 0}})),u.success(`"${s}" 그룹ì ${r}ëª ì ìí ì´ ì ê±°ëììµëë¤.`)}catch(r){console.error("ìí 그룹 ìì ì¤í¨:",r),u.error("ìí 그룹 ìì ì ì¤í¨íìµëë¤.")}}function I(s,a,r,l){_(c=>{var i;return{...c,[s]:{...c[s],[a]:{...((i=c[s])==null?void 0:i[a])||{read:!1,write:!1},[r]:l,...r==="read"&&!l?{write:!1}:{}}}}})}async function ne(){if(p!=="super_admin"){u.error("ê¶í ì¤ì ì ìµê³ ê´ë¦¬ìë§ ë³ê²½í ì ììµëë¤.");return}try{A(!0),await q(S(N,"system","permissions"),E),u.success("ê¶í ì¤ì ì´ ì ì¥ëììµëë¤. í´ë¹ ìí ì ì¬ì©ìê° ë¤ì ë¡ê·¸ì¸íë©´ ì ì©ë©ëë¤.")}catch(s){console.error("ê¶í ì ì¥ ì¤í¨:",s),u.error("ê¶í ì ì¥ì ì¤í¨íìµëë¤.")}finally{A(!1)}}function ce({read:s,write:a}){return a?e.jsx(X,{className:"w-4 h-4 text-green-600"}):s?e.jsx(H,{className:"w-4 h-4 text-blue-500"}):e.jsx(J,{className:"w-4 h-4 text-gray-300"})}return n?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500 text-[13px]",children:"ë¡ë© ì¤..."})}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[e.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(ge,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"text-[11px] text-gray-500 font-medium",children:"ì´ ê´ë¦¬ì"})]}),e.jsxs("div",{className:"text-2xl font-bold text-gray-900 tabular-nums",children:[se,"ëª "]})]}),e.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(T,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"text-[11px] text-gray-500 font-medium",children:"ìí ì¢ ë¥"})]}),e.jsxs("div",{className:"text-2xl font-bold text-gray-900 tabular-nums",children:[Object.keys(j).length,"ê°"]})]}),e.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(be,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"text-[11px] text-gray-500 font-medium",children:"ë©ë´ í목"})]}),e.jsxs("div",{className:"text-2xl font-bold text-gray-900 tabular-nums",children:[Object.keys(z).length,"ê°"]})]}),e.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(K,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"text-[11px] text-gray-500 font-medium",children:"ì ì²´ êµì¸"})]}),e.jsxs("div",{className:"text-2xl font-bold text-gray-900 tabular-nums",children:[x.length,"ëª "]})]})]}),e.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm",children:[e.jsxs("div",{className:"flex border-b border-gray-200",children:[e.jsxs("button",{onClick:()=>P("roles"),className:`flex-1 px-4 py-3 text-[13px] font-medium transition-colors flex items-center justify-center gap-2 ${O==="roles"?"text-blue-600 border-b-2 border-blue-600 bg-blue-50":"text-gray-600 hover:text-gray-900 hover:bg-gray-50"}`,children:[e.jsx(V,{className:"w-4 h-4"}),"ìí ë¶ì¬"]}),e.jsxs("button",{onClick:()=>P("permissions"),className:`flex-1 px-4 py-3 text-[13px] font-medium transition-colors flex items-center justify-center gap-2 ${O==="permissions"?"text-blue-600 border-b-2 border-blue-600 bg-blue-50":"text-gray-600 hover:text-gray-900 hover:bg-gray-50"}`,children:[e.jsx(T,{className:"w-4 h-4"}),"ê¶í ì¤ì "]})]}),e.jsx("div",{className:"p-4",children:O==="roles"?e.jsx("div",{className:"space-y-4",children:Object.entries(ue).map(([s,a])=>{const r=a.reduce((l,c)=>l+C[c].length,0);return e.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-4 py-2 border-b border-gray-200 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h3",{className:"text-[13px] font-bold text-gray-700",children:s}),e.jsxs("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-gray-200 text-gray-600",children:[r,"ëª "]})]}),w&&r>0&&e.jsxs("button",{onClick:()=>le(s,a),className:"text-[11px] px-2 py-1 text-red-600 hover:bg-red-50 rounded transition-colors flex items-center gap-1",title:"그룹 ë´ ëª¨ë ìí ìì ",children:[e.jsx(ye,{className:"w-3 h-3"}),"ì ì²´ìì "]})]}),e.jsx("div",{className:"divide-y divide-gray-100",children:a.map(l
2=>e.jsxs("div",{className:"p-3 hover:bg-gray-50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[13px] font-medium text-gray-900",children:j[l]}),e.jsxs("span",{className:`text-[10px] px-1.5 py-0.5 rounded ${C[l].length>0?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"}`,children:[C[l].length,"ëª
"]})]}),Q.includes(l)&&e.jsxs("button",{onClick:()=>{f(l),t(!0)},className:"text-[11px] px-2 py-1 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors flex items-center gap-1",children:[e.jsx(V,{className:"w-3 h-3"}),"ì¶ê°"]})]}),C[l].length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:C[l].map(c=>e.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-blue-50 text-blue-700 rounded-full text-[12px] group",children:[e.jsx("span",{children:c.name}),e.jsx("button",{onClick:()=>ae(c.id,l),className:"w-4 h-4 rounded-full bg-blue-200 hover:bg-red-400 hover:text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(W,{className:"w-3 h-3"})})]},c.id))})]},l))})]},s)})}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg px-4 py-3",children:e.jsxs("p",{className:"text-[11px] text-blue-700",children:["ê° ìí ë³ë¡ ì ê·¼í ì ìë ë©ë´ë¥¼ ì¤ì í©ëë¤. ì¬ì´ëë° ë©ë´ 구조ì ëì¼í©ëë¤.",e.jsx("br",{}),"ì ì¥ í í´ë¹ ìí ì ì¬ì©ìê° ë¤ì ë¡ê·¸ì¸íë©´ ë³ê²½ë ê¶íì´ ì ì©ë©ëë¤."]})}),e.jsx("div",{className:"flex flex-wrap gap-2 pb-4 border-b border-gray-200",children:Object.entries(j).sort((s,a)=>F[a[0]]-F[s[0]]).map(([s,a])=>e.jsxs("button",{onClick:()=>M(s),className:`px-3 py-1.5 rounded-full text-[12px] font-medium transition-all ${g===s?"bg-blue-600 text-white shadow-sm":s==="super_admin"?"bg-red-50 text-red-600 hover:bg-red-100":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:[a,s==="super_admin"&&" (ì ì²´ê¶í)"]},s))}),g?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-[14px] font-bold text-gray-900",children:[j[g]," ê¶í"]}),e.jsx("p",{className:"text-[11px] text-gray-500 mt-0.5",children:g==="super_admin"?"ìµê³ ê´ë¦¬ìë 모ë ë©ë´ì ì ì²´ ê¶íì ê°ì§ëë¤":"ì´ ìí ì´ ì ê·¼í ì ìë ë©ë´ì 기ë¥ì ì¤ì í©ëë¤"})]}),g!=="super_admin"&&e.jsxs("button",{onClick:ne,disabled:$||p!=="super_admin",className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-[12px] font-medium disabled:bg-gray-400 disabled:cursor-not-allowed",children:[e.jsx(Z,{className:"w-4 h-4"}),$?"ì ì¥ ì¤...":"ì ì¥"]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-[11px] text-gray-500 bg-gray-50 rounded-lg px-3 py-2",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(X,{className:"w-3 h-3 text-green-600"})," ì½ê¸°+ì°ê¸°"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(H,{className:"w-3 h-3 text-blue-500"})," ì½ê¸°ë§"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(J,{className:"w-3 h-3 text-gray-300"})," ê¶íìì"]})]}),Object.entries(he).map(([s,a])=>e.jsxs("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-4 py-2 border-b border-gray-200 flex items-center justify-between",children:[e.jsx("h4",{className:"text-[12px] font-bold text-gray-700",children:s}),e.jsxs("div",{className:"flex gap-6 text-[10px] text-gray-500",children:[e.jsx("span",{className:"w-12 text-center",children:"ì½ê¸°"}),e.jsx("span",{className:"w-12 text-center",children:"ì°ê¸°"})]})]}),e.jsx("div",{className:"divide-y divide-gray-100",children:a.map(r=>{var c;const l=((c=E[g])==null?void 0:c[r])||{read:!1,write:!1};return e.jsxs("div",{className:"px-4 py-2.5 flex items-center justify-between hover:bg-gray-50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ce,{read:l.read,write:l.write}),e.jsx("span",{className:"text-[12px] text-gray-700",children:z[r]})]}),e.jsxs("div",{className:"flex gap-6",children:[e.jsx("label",{className:"w-12 flex justify-center",children:e.jsx("input",{type:"checkbox",checked:l.read,onChange:i=>I(g,r,"read",i.target.checked),disabled:p!=="super_admin"||g==="super_admin",className:"w-4 h-4 accent-blue-500 cursor-pointer disabled:cursor-not-allowed"})}),e.jsx("label",{className:"w-12 flex justify-center",children:e.jsx("input",{type:"checkbox",checked:l.write,onChange:i=>I(g,r,"write",i.target.checked),disabled:p!=="super_admin"||g==="super_admin"||!l.read,className:"w-4 h-4 accent-green-500 cursor-pointer disabled:cursor-not-allowed disabled:opacity-30"})})]})]},r)})})]},s))]}):e.jsxs("div",{className:"text-center py-12 text-gray-500",children:[e.jsx(T,{className:"w-12 h-12 mx-auto mb-3 text-gray-300"}),e.jsx("p",{className:"text-[13px]",children:"ìí ì ì ííì¬ ê¶íì ì¤ì íì¸ì"}),e.jsx("p",{className:"text-[11px] text-gray-400 mt-1",children:"ê° ìí ì´ ì ê·¼í ì ìë ì¬ì´ëë° ë©ë´ë¥¼ ì¤ì í©ëë¤"})]})]})})]}),D&&b&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white rounded-xl shadow-2xl w-full max-w-md mx-4",children:[e.jsxs("div",{className:"p-4 border-b border-gray-200 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-[14px] font-bold text-gray-900",children:[j[b]," ìí ë¶ì¬"]}),e.jsx("p",{className:"text-[11px] text-gray-500 mt-0.5",children:"êµì¸ì ê²ìíì¬ ìí ì ë¶ì¬íì¸ì"})]}),e.jsx("button",{onClick:()=>{t(!1),f(null),R("")},className:"p-1 hover:bg-gray-100 rounded",children:e.jsx(W,{className:"w-5 h-5 text-gray-500"})})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(fe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}
2),e.jsx("input",{type:"text",value:v,onChange:s=>R(s.target.value),placeholder:"êµì¸ ì´ë¦ ê²ì...",className:"w-full pl-10 pr-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent text-[13px]",autoFocus:!0})]}),e.jsx("div",{className:"mt-3 max-h-64 overflow-y-auto",children:v.trim()===""?e.jsx("div",{className:"text-center py-8 text-gray-400 text-[12px]",children:"ì´ë¦ì ì
ë ¥íì¬ ê²ìíì¸ì"}):G.length===0?e.jsx("div",{className:"text-center py-8 text-gray-400 text-[12px]",children:"ê²ì ê²°ê³¼ê° ììµëë¤"}):e.jsx("div",{className:"space-y-1",children:G.map(s=>e.jsxs("button",{onClick:()=>re(s.id,b),className:"w-full flex items-center justify-between px-3 py-2.5 hover:bg-blue-50 rounded-lg transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center",children:e.jsx(K,{className:"w-4 h-4 text-gray-500"})}),e.jsx("span",{className:"text-[13px] text-gray-900",children:s.name})]}),e.jsx(je,{className:"w-4 h-4 text-gray-300 group-hover:text-blue-600 transition-colors"})]},s.id))})})]})]})})]})}function Me(){const[x,y]=o.useState("permissions");return 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(Ne,{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:()=>y("permissions"),className:`flex-1 px-4 py-3 text-[13px] font-medium transition-colors ${x==="permissions"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-900"}`,children:[e.jsx(T,{className:"w-4 h-4 inline mr-2"}),"ê¶í ê´ë¦¬"]}),e.jsxs("button",{onClick:()=>y("app"),className:`flex-1 px-4 py-3 text-[13px] font-medium transition-colors ${x==="app"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-900"}`,children:[e.jsx(ee,{className:"w-4 h-4 inline mr-2"}),"ì± ì¤ì "]})]}),e.jsx("div",{className:"p-6",children:x==="permissions"?e.jsx(_e,{}):e.jsx(Re,{})})]})]})}function Re(){var R,g,M,D;const[x,y]=o.useState(!0),[E,_]=o.useState(!1),[n,h]=o.useState({app_name:"ìëëí",app_version:"1.0.0",departments:{youth:!0,baby:!0,yunyen:!0,sonyeon:!0,middle:!0,high:!0,together:!0,elders:!0,men:!0,women:!0,deacons:!0,elders_women:!0},features:{bulletin:!0,qt:!0,prayer:!0,offering:!0,streaming:!0,directory:!0,attendance:!0,new_family:!0,youtube:!0},notifications:{worship_reminder:!0,qt_reminder:!0,event_reminder:!0,notice_reminder:!0,prayer_reminder:!0},theme:{primary_color:"#03C75A",secondary_color:"#233170"},updated_by:"admin"});o.useEffect(()=>{$()},[]);async function $(){try{y(!0);const t=await Y.getAppSettings();t&&h(t)}catch(t){console.error("ì± ì¤ì ë¡ë© ì¤í¨:",t),u.error("ì± ì¤ì ì ë¶ë¬ì¬ ì ììµëë¤")}finally{y(!1)}}async function A(){try{_(!0),await Y.saveAppSettings(n),u.success("ì± ì¤ì ì´ ì ì¥ëììµëë¤")}catch{u.error("ì ì¥ì ì¤í¨íìµëë¤")}finally{_(!1)}}if(x)return e.jsx("div",{className:"text-gray-500 text-[13px] text-center py-8",children:"ì¤ì ì ë¶ë¬ì¤ë ì¤..."});const O=[{key:"youth",label:"ì²ë
ë¶",icon:"ð¨âð©âð§"},{key:"baby",label:"ììë¶",icon:"ð¶"},{key:"yunyen",label:"ì ë
ë¶",icon:"ð§"},{key:"sonyeon",label:"ìë
ë¶",icon:"ð¦"},{key:"middle",label:"ì¤ë±ë¶",icon:"ð"},{key:"high",label:"ê³ ë±ë¶",icon:"ð"},{key:"together",label:"í¬ê²ë(ì¥ë
)",icon:"ð¨âð©âð§âð¦"},{key:"elders",label:"ë¹í",icon:"âª"},{key:"men",label:"ë¨ì ëí",icon:"ð"},{key:"women",label:"ì¬ì ëí",icon:"ð"},{key:"deacons",label:"ê¶ì¬í",icon:"ð"},{key:"elders_women",label:"ì¬ì¥ë¡í",icon:"â¨"}],P=[{key:"bulletin",label:"주보",desc:"ì£¼ê° ì£¼ë³´ ì´ë"},{key:"qt",label:"QT",desc:"ë§¤ì¼ ë§ì묵ì"},{key:"prayer",label:"기ëìì²",desc:"ì¤ë³´ê¸°ë ëë"},{key:"offering",label:"íê¸",desc:"ì¨ë¼ì¸ íê¸ ìë´"},{key:"streaming",label:"ì¤ìê° ìë°°",desc:"ì íë¸ ìë°° ì°ê²°"},{key:"directory",label:"êµí 주ìë¡",desc:"ì±ë ì°ë½ì² ê²ì"},{key:"attendance",label:"ì¶ìì²´í¬",desc:"ìë°° ì¶ì ê´ë¦¬"},{key:"new_family",label:"ìê°ì¡± ë±ë¡",desc:"ìê°ì¡± ì ì"},{key:"youtube",label:"ì íë¸",desc:"ì¤êµ ìì ìì²"}],v=[{key:"worship_reminder",label:"ìë°° ì림",desc:"ìë°° ìì 30ë¶ ì ì림"},{key:"qt_reminder",label:"QT ì림",desc:"ë§¤ì¼ ì¤ì 6ì QT ì림"},{key:"event_reminder",label:"íì¬ ì림",desc:"êµí íì¬ ì¬ì ì림"},{key:"notice_reminder",label:"ê³µì§ ì림",desc:"ì ê³µì§ì¬í ì림"},{key:"prayer_reminder",label:"기ëìì² ì림",desc:"ì 기ëìì² ì림"}];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(ee,{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:"ì± ì´ë¦"}),e.jsx("input",{type:"text",value:n.app_name,onChange:t=>h({...n,app_name:t.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:n.app_version,onChange:t=>h({...n,app_version:t.target.value}),className:"compact-input",placeholder:"1.0.0"})]})]})]}),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(ve,{className:"w-4 h-4"}),"ë¶ìë³ íì±í"]}),e.jsx("p",{className:"text-[11px] text-gray-500",children:"ë¹íì±íë ë¶ìë ì± ë©ë´ìì ì¨ê²¨ì§ëë¤"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:O.map(({key:t,label:b,icon:f})=>{var m,p;return e.jsxs("label",{className:`flex items-center gap-3 p-3 rounded border cursor-pointer transition-colors ${(m=n.departments)!=null&&m[t]?"bg-green-50 border-green-200":"bg-gray-50 border-gray-200"}`,children:[e.jsx("input",{type:"checkbox",checked:((p=n.departments)==null?void 0:p[t])??!0,onChange:w=>h({...n,departments:{...n.departments,[t]:w.target.checked}}),className:"w-4 h-4 accent-blue-600"}),e.jsx("span",{className:"text-[16px]",children:f}),e.jsx("span",{className:"text-[13px] text-gray-900",children:b})]},t)})})]}),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(we,{className:"w-4 h-4"}),"ê¸°ë¥ íì±í"]}),e.jsx("p",{className:"text-[11px] text-gray-500",children:"ë¹íì±íë 기ë¥ì ì±ìì ì¬ì©í ì ììµëë¤"}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:P.map(({key:t,label:b,desc:f})=>{var m,p;return e.jsxs("label",{className:`flex flex-col p-3 rounded border cursor-pointer transition-colors ${(m=n.features)!=null&&m[t]?"bg-green-50 border-green-200":"bg-gray-50 border-gray-200"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("input",{type:"checkbox",checked:((p=n.features)==null?void 0:p[t])??!0,onChange:w=>h({...n,features:{...n.features,[t]:w.target.checked}}),className:"w-4 h-4 accent-blue-600"}),e.jsx("span",{className:"text-[13px] font-medium text-gray-900",children:b})]}),e.jsx("span",{className:"text-[10px] text-gray-500 ml-6",children:f})]},t)})})]}),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(ke,{className:"w-4 h-4"}),"í¸ì ì림 ì¤ì "]}),e.jsx("p",{className:"text-[11px] text-gray-500",children:"ì ì í¸ì ì림 ì¤ì (ì¬ì©ìë³ë¡ ì¬ì¤ì ê°ë¥)"}),e.jsx("div",{className:"space-y-2",children:v.map(({key:t,label:b,desc:f})=>{var m,p;return e.jsxs("label",{className:`flex items-center justify-between p-3 rounded border cursor-pointer transition-colors ${(m=n.notifications)!=null&&m[t]?"bg-green-50 border-green-200":"bg-gray-50 border-gray-200"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"checkbox",checked:((p=n.notifications)==null?void 0:p[t])??!0,onChange:w=>h({...n,notifications:{...n.notifications,[t]:w.target.checked}}),className:"w-4 h-4 accent-blue-600"}),e.jsx("span",{className:"text-[13px] font-medium text-gray-900",children:b})]}),e.jsx("span",{className:"text-[11px] text-gray-500",children:f})]},t)})})]}),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(Se,{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:"주 ìì (ë¤ì´ë² 그린)"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"color",value:(R=n.theme)==null?void 0:R.primary_color,onChange:t=>h({...n,theme:{...n.theme,primary_color:t.target.value}}),className:"w-12 h-10 rounded cursor-pointer border border-gray-200"}),e.jsx("input",{type:"text",value:(g=n.theme)==null?void 0:g.primary_color,onChange:t=>h({...n,theme:{...n.theme,primary_color:t.target.value}}),className:"compact-input flex-1",placeholder:"#03C75A"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[12px] font-medium text-gray-700 mb-1",children:"ë³´ì¡° ìì (ìë ë¸ë£¨)"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"color",value:(M=n.theme)==null?void 0:M.secondary_color,onChange:t=>h({...n,theme:{...n.theme,secondary_color:t.target.value}}),className:"w-12 h-10 rounded cursor-pointer border border-gray-200"}),e.jsx("input",{type:"text",value:(D=n.theme)==null?void 0:D.secondary_color,onChange:t=>h({...n,theme:{...n.theme,secondary_color:t.target.value}}),className:"compact-input flex-1",placeholder:"#233170"})]})]})]})]}),e.jsx("div",{className:"pt-4 border-t border-gray-200",children:e.jsxs("button",{onClick:A,disabled:E,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(Z,{className:"w-4 h-4"}),E?"ì ì¥ ì¤...":"ì¤ì ì ì¥"]})})]})}export{Me as SystemSettingsPage};
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.