1import{m as H,n as V,o as L,K as Ce,L as Re,x as De,Y as _e,z as U,y as Me,r as m,j as e,b as Te,ay as W,t as $,P as Ie}from"./index-DJGi9kSq.js";import{auth as w}from"./firebaseAuth-D21EO0Hc.js";import{A as Ee}from"./arrow-left-CXrnAMCI.js";import{S as Oe}from"./shield-D_oqMCnL.js";import{C as I}from"./circle-alert-CDJhH09W.js";import{C as ne}from"./circle-check-k0rs3Pw1.js";import{C as le}from"./circle-Cetb1qCP.js";import{C as Le}from"./clock-CkT6v99f.js";import{F as Be}from"./file-text-CejNMU-w.js";import{E as ce}from"./external-link-CfkJZ4lA.js";import{L as Ke}from"./landmark-DVIIG0WO.js";import"./index.esm-BQEAOfp1.js";async function qe(){return(await H(V(L,"refundRules"))).docs.map(a=>({ruleId:a.id,...a.data()}))}async function Fe(){return(await H(V(L,"refundAgencies"))).docs.map(a=>({agencyId:a.id,...a.data()})).filter(a=>a.isActive!==!1)}const A=s=>{if(!s)return null;const a=new Date(s);return Number.isNaN(a.getTime())?null:a},P=(s,a,r)=>{switch(a){case"<=":return s<=r;case"<":return s<r;case">=":return s>=r;case">":return s>r;case"==":return s===r;default:return!1}},de=s=>{const a=s.getMonth()+1,r=s.getDate();
1return a===7&&r>=15||a===8&&r<=24||a===12&&r>=20||a===1||a===2&&r<=20};function ie(s,a){const r=c=>a[c];switch(s.fn){case"hoursBetween":{const c=A(r(s.args[0])),o=A(r(s.args[1]));return!c||!o?!1:P(Math.abs(o.getTime()-c.getTime())/36e5,s.op,s.value)}case"daysBetween":{const c=A(r(s.args[0])),o=A(r(s.args[1]));return!c||!o?!1:P(Math.abs(o.getTime()-c.getTime())/864e5,s.op,s.value)}case"equals":return r(s.args[0])===s.value;case"includes":return Array.isArray(r(s.args[0]))&&r(s.args[0]).includes(s.value);case"inRange":{const c=A(r(s.args[0])),o=A(r(s.args[1]));return!c||!o||!(s.season==="peak"?de(o):!de(o))?!1:P(Math.abs(o.getTime()-c.getTime())/864e5,s.op,s.value)}default:return!1}}function Ue(s,a){return!s||typeof s!="object"?!1:Array.isArray(s.all)?s.all.every(r=>ie(r,a)):Array.isArray(s.any)?s.any.some(r=>ie(r,a)):!1}function Pe(s,a){const r=s.filter(i=>(i.category||[]).includes(a.category)).filter(i=>Ue(i.conditions,a)).sort((i,b)=>(b.weight||0)-(i.weight||0)),c=r.reduce((i,b)=>i+(b.weight||0),0),o=r.some(i=>i.strength==="strong"),p=r.length===0?"none":o||c>=40?"strong":c>=20?"moderate":"weak",y=typeof a.paidAmount=="number"&&a.paidAmount>0?Math.max(a.paidAmount-(a.refundedAmount||0),0):null;return{level:p,score:c,matchedRules:r,estimatedRecovery:y}}const O=s=>{const a=A(s);return a?`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")} ${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`:"(ì ë ¥ ì ë¨)"},We=s=>{const a=A(s);return a?`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`:"(ì ë ¥ ì ë¨)"},D=(s,a)=>typeof s=="number"?`${s.toLocaleString("ko-KR")}${a==="KRW"||!a?"ì":` ${a}`}`:"(ì ë ¥ ì ë¨)",Y={flight:"íê³µê¶",hotel:"ìë°",tour:"í¬ì´Â·ì¡í°ë¹í°",car:"ë í°ì¹´"};function Ye(s,a){const r=a.estimatedRecovery,c=a.matchedRules.map((y,i)=>{const b=y.documentSnippet||`${y.title}: ${y.userExplain}`,_=y.legalBasis?` (근거: ${y.legalBasis})`:"";return`${i+2}. ${b}${_}`}).join(` 2`),o=`[íë¶ ì구] ${s.bookingRef?`ìì½ë²í¸ ${s.bookingRef} `:""}ì·¨ì ììë£ íë¶ ìì²`,p=`${s.merchantName} ë´ë¹ìëê» 3 41. 본ì¸ì ${O(s.paidAt)} ê·ì¬ë¥¼ íµí´ ${Y[s.category]||"ìí"}ì ê²°ì íê³ , ${O(s.cancelRequestedAt)} ì·¨ì를 ìì²íììµëë¤.${s.bookingRef?` (ìì½ë²í¸: ${s.bookingRef})`:""} 5${c||"2. ê´ë ¨ ë²ë ¹ê³¼ ìë¹ìë¶ìí´ê²°ê¸°ì¤ì ë°ë¥¸ ì ë¹í íë¶ì ìì²í©ëë¤."} 6 7ì´ì ê²°ì ëê¸ ${D(s.paidAmount,s.currency)}${r&&r!==s.paidAmount?` ì¤ ë¯¸íë¶ì¡ ${D(r,s.currency)}`:" ì ì¡"}ì íë¶ì ì구íë©°, 본 ìì² ìë ¹ì¼ë¡ë¶í° 7ì¼ ì´ë´ íì ì ìì²í©ëë¤. 8íì ì´ ìì ê²½ì° ìì¸ì ì ììê±°ëì¼í°Â·íêµìë¹ìì ë± ê´ê³ 기ê´ì í¼í´êµ¬ì 를 ì ì²í ìì ì ëë¤. 9 10${new Date().getFullYear()}-${String(new Date().getMonth()+1).padStart(2,"0")}-${String(new Date().getDate()).padStart(2,"0")} 11ìì²ì¸ ë림`;return{title:o,body:p}}function oe(s,a){const r=a.estimatedRecovery;return[{label:"ì 목",text:`${s.merchantName} ${Y[s.category]||""} ì·¨ì ììë£ íë¶ ê´ë ¨ í¼í´êµ¬ì ì ì²`},{label:"í¼ì ì²ì¸(ì¬ì ì)",text:s.merchantName},{label:"ì ì²ì·¨ì§",text:`ê²°ì ëê¸ ${D(s.paidAmount,s.currency)}${r&&r!==s.paidAmount?` ì¤ ë¯¸íë¶ì¡ ${D(r,s.currency)}`:" ì ì¡"}ì íë¶ì ìì²í©ëë¤.`},{label:"ì ì²ì´ì ",text:`본ì¸ì ${O(s.paidAt)} ì ì¬ì ì를 íµí´ ${Y[s.category]||"ìí"}(ì´ì© ìì ì¼ ${We(s.serviceDate)})ì ê²°ì íìê³ , ${O(s.cancelRequestedAt)} ì·¨ì를 ìì²íìµëë¤. 12${a.matchedRules.map((c,o)=>`(${o+1}) ${c.documentSnippet||`${c.title} â ${c.userExplain}`}${c.legalBasis?` [근거: ${c.legalBasis}]`:""}`).join(` 13`)} 14ì¬ì ììê² ${D(s.paidAmount,s.currency)}ì íë¶ì ì구íì¼ë í´ê²°ëì§ ìì í¼í´êµ¬ì 를 ì ì²í©ëë¤.`}]}function ze(){const s=new Date,a=Math.random().toString(36).slice(2,6).toUpperCase();return`RF-${s.getFullYear()}-${String(s.getMonth()+1).padStart(2,"0")}${String(s.getDate()).padStart(2,"0")}-${a}`}async function C(s,a,r){const c=w.currentUser?.uid;if(!c)throw new Error("ë¡ê·¸ì¸ì´ íìí©ëë¤.");const o=De(L,"refundCases",s);r?await Me(o,{...a,uid:c,createdAt:U(),updatedAt:U()}):await _e(o,{...a,updatedAt:U()})}async function S(){const s=w.currentUser?.uid;return s?(await H(Ce(V(L,"refundCases"),Re("uid","==",s)))).docs.map(r=>({id:r.id,...r.data()})).sort((r,c)=>(c.updatedAt?.seconds||0)-(r.updatedAt?.seconds||0)):[]}const E="íë¶ëì°ë¯¸ë ë²ë¥ ì문ì ì ê³µíì§ ìì¼ë©°, 결과를 ë³´ì¥íì§ ììµëë¤.",xe=[{id:"flight",icon:"âï¸",label:"íê³µê¶",ready:!0},{id:"hotel",icon:"ð¨",label:"í¸í ·ìë°",ready:!1},{id:"tour",icon:"ðï¸",label:"í¬ì´Â·ì¡í°ë¹í°",ready:!1},{id:"car",icon:"ð",label:"ë í°ì¹´",ready:!1}],He=[{id:"direct",label:"íê³µì¬Â·í¸í ìì ì§ì ",desc:"ê³µì ííì´ì§Â·ì±ìì ìì½"},{id:"ota",label:"OTA·ì¬íì¬",desc:"í¸ë¦½ë·ì»´, ìê³ ë¤, ì¸í°íí¬í¬ì´ ë±"},{id:"vacance",label:"ë ë°ìºì¤ìì ì°ê²°",desc:"ì°ë¦¬ ì±ìì ì´ëí´ ìì½"}],Ve=[{id:"change_of_mind",label:"ë¨ì ë³ì¬ · ì¼ì ë³ê²½",evidence:""},{id:"medical",label:"본ì¸Â·ê°ì¡±ì ì§ë³ · ë¶ì · ì¬ë§",evidence:"ì§ë¨ì/ì ìíì¸ì (ì§ê³ê°ì¡±ì´ë©´ ê°ì¡±ê´ê³ì¦ëª ì)"},{id:"merchant_fault",label:"íê³µì¬Â·ìì 측ì ë³ê²½ (ê²°í·ì§ì°Â·ì¤ì¼ì¤ ë³ê²½Â·ì¤ë²ë¶í¹)",evidence:"ê²°í·ë³ê²½ íµë³´ 문ì ëë ë©ì¼ 캡ì²"},{id:"force_majeure",label:"ì²ì¬ì§ë³ · ì¬ë · ê°ì¼ë³ / ì¸êµë¶ ì¬í경보",evidence:"ì¬í경보 ë°ë ¹ íë©´ ëë ê³µì ë°í 캡ì²"},{id:"terms_not_disclosed",label:"íë¶ê·ì ì ì ëë¡ ìë´ë°ì§ 못í¨",evidence:"ìì½ ë¹ì íë¶ê·ì íì´ì§ 캡ì²"},{id:"voucher_only",label:"íê¸ ëì ë°ì°ì²Â·í¬ë ë§ì¼ë¡ë§ ì¤ë¤ê³ í¨",evidence:"ë°ì°ì² ìë´ íë©´ 캡ì²"},{id:"delayed_response",label:"ì·¨ìë ì ë ìì²íëë° ìëµì´ ë¦ì´ ììë£ê° ì¬ë¼ê°",evidence:"ì·¨ì ìì² ìê°ì´ ë³´ì´ë íë©´ 캡ì²"}],Ge=[{id:"card_domestic",label:"ì ì©ì¹´ë (êµë´ ê²°ì )"},{id:"card_overseas",label:"ì ì©ì¹´ë (í´ì¸ ê²°ì )"},{id:"easy_pay",label:"ê°í¸ê²°ì "},{id:"transfer",label:"ê³ì¢ì´ì²´"}],Je=["ìì½íì¸ì","ê²°ì ë´ì(ì¹´ëì í)","ì·¨ì ìì² ìê°ì´ ë³´ì´ë íë©´ 캡ì²","ì¬ì ì ëµë³ 캡ì²"],R={strong:{text:"ì ì¡íë¶ì ì구í ê·¼ê±°ê° ê°í©ëë¤",color:"#15803d",bg
14:"#f0fdf4"},moderate:{text:"íë¶ì ì구í ê·¼ê±°ê° ììµëë¤",color:"#b45309",bg:"#fffbeb"},weak:{text:"ê·¼ê±°ê° ì½íì§ë§ ìëí ì ììµëë¤",color:"#6b7280",bg:"#f9fafb"},none:{text:"ìë ì§ë¨ì¼ë¡ë 근거를 ì°¾ì§ ëª»íìµëë¤",color:"#6b7280",bg:"#f9fafb"}},me={draft:"ìì± ì¤",diagnosed:"ì§ë¨ ìë£",submitted_merchant:"ì¬ì
ì ì구ì ë°ì¡",awaiting_merchant:"ì¬ì
ì íì ë기",submitted_agency:"ê¸°ê´ ì ì",in_review:"ì²ë¦¬ ì¤",escalated:"ë¤ì ë¨ê³ ì§í",resolved_refunded:"íë¶ ìë£",resolved_partial:"ì¼ë¶ íë¶",rejected:"ê±°ì ë¨",abandoned:"ì¤ë¨"},z=async(s,a)=>{try{await navigator.clipboard.writeText(s),$.success(`${a}ì(를) ë³µì¬íìµëë¤.`)}catch{$.error("ë³µì¬ì ì¤í¨íìµëë¤. ê¸¸ê² ëë¬ ì§ì ë³µì¬í´ 주ì¸ì.")}};function it({onPageChange:s}){const[a,r]=m.useState("list"),[c,o]=m.useState([]),[p,y]=m.useState([]),[i,b]=m.useState([]),[_,G]=m.useState(null),[x,M]=m.useState(1),[f,J]=m.useState(""),[he,Q]=m.useState(""),[l,X]=m.useState({category:"",merchantType:"",merchantName:"",reasons:[],currency:"KRW"}),[u,Z]=m.useState(null),[ge,ee]=m.useState({}),[te,B]=m.useState(""),[K,q]=m.useState("");m.useEffect(()=>{window.scrollTo(0,0),qe().then(o).catch(t=>console.error("ð¡ 룰 ë¡ë ì¤í¨:",t)),Fe().then(y).catch(t=>console.error("ð¡ ê¸°ê´ ë¡ë ì¤í¨:",t)),S().then(b).catch(()=>{})},[]);const j=t=>X(n=>({...n,...t})),se=m.useMemo(()=>{if(!l.paidAt||!l.cancelRequestedAt)return null;const t=new Date(l.paidAt).getTime(),n=new Date(l.cancelRequestedAt).getTime();if(Number.isNaN(t)||Number.isNaN(n)||n<t)return null;const d=(n-t)/36e5;if(d<=24)return`ê²°ì í ${Math.round(d)}ìê° ë§ì ì·¨ì â 24ìê° ë£° ì ì© ê°ë¥ 구ê°ì
ëë¤`;const h=d/24;return h<=7&&l.merchantType==="ota"?`ê²°ì í ${Math.floor(h)}ì¼ì§¸ ì·¨ì â ì ììê±°ë ì²ì½ì² í(7ì¼) 구ê°ì
ëë¤`:null},[l.paidAt,l.cancelRequestedAt,l.merchantType]),be=m.useMemo(()=>{switch(x){case 1:return!!(l.category&&l.merchantType&&l.merchantName.trim());case 2:return!!(l.paidAt&&l.cancelRequestedAt&&l.paidAmount);case 3:return l.reasons.length>0;default:return!0}},[x,l]),pe=()=>{X({category:"",merchantType:"",merchantName:"",reasons:[],currency:"KRW"}),Z(null),ee({}),B(""),q(""),J(""),Q(""),M(1),r("wizard"),window.scrollTo(0,0)},ye=()=>{const t=Pe(c,l);Z(t);const n=Ye(l,t);if(B(n.title),q(n.body),w.currentUser){const d=f||`rc_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,h=he||ze();J(d),Q(h),C(d,{caseNo:h,status:"diagnosed",...l,diagnosis:{level:t.level,score:t.score,matchedRules:t.matchedRules.map(g=>g.ruleId),estimatedRecovery:t.estimatedRecovery,diagnosedAt:new Date().toISOString()},timeline:[{at:new Date().toISOString(),type:"diagnosed",message:`ì§ë¨ ìë£ â 근거 ${t.matchedRules.length}ê±´ (${t.level})`}]},!f).then(()=>S().then(b)).catch(g=>console.error("ð¡ ì¼ì´ì¤ ì ì¥ ì¤í¨:",g))}},fe=async t=>{if(!(!w.currentUser||!f))try{await C(f,{status:"submitted_merchant",documents:[{templateId:"merchant_demand_client_v1",body:K,createdAt:new Date().toISOString()}],nextAction:{code:"await_merchant",label:"ì¬ì
ì íì ë기 (7ì¼)",dueAt:new Date(Date.now()+7*864e5).toISOString()},timeline:[...i.find(n=>n.id===f)?.timeline||[],{at:new Date().toISOString(),type:"sent_L1",message:`ì¬ì
ìì íë¶ ì구ì ì ë¬ (${t})`}]},!1),S().then(b)}catch(n){console.error(n)}},je=async(t,n)=>{if(!w.currentUser||!f){$.info("ë¡ê·¸ì¸íë©´ ì ì ì´ë ¥ì´ ì ì¥ë©ëë¤.");return}try{await C(f,{status:"submitted_agency",submissions:[{agencyId:t.agencyId,channel:t.channel?.type||"",mode:"assisted",sentAt:new Date().toISOString(),externalRefNo:n,status:"submitted"}],nextAction:{code:"await_agency",label:`${t.nameKr} ì²ë¦¬ ë기${t.slaDays?` (íì¤ ${t.slaDays}ì¼)`:""}`,dueAt:t.slaDays?new Date(Date.now()+t.slaDays*864e5).toISOString():null},timeline:[...i.find(d=>d.id===f)?.timeline||[],{at:new Date().toISOString(),type:"submitted_agency",message:`${t.nameKr} ì ì${n?` (ì ìë²í¸ ${n})`:""}`}]},!1),$.success(`${t.nameKr} ì ì를 기ë¡íìµëë¤.`),S().then(b)}catch(d){console.error(d)}},k=async(t,n,d,h={})=>{try{await C(t.id,{status:n,timeline:[...t.timeline||[],{at:new Date().toISOString(),type:n,message:d}],...h},!1);const g={...t,status:n,timeline:[...t.timeline||[],{at:new Date().toISOString(),type:n,message:d}],...h};G(g),S().then(b),$.success(d)}catch(g){console.error(g),$.error("ì ì¥ì ì¤í¨íìµëë¤.")}},Ne=t=>{const n={category:t.category||"flight",merchantType:t.merchantType||"",merchantName:t.merchantName||"",bookingRef:t.bookingRef,paidAt:t.paidAt,cancelRequestedAt:t.cancelRequestedAt,serviceDate:t.serviceDate,paidAmount:t.paidAmount,refundedAmount:t.refundedAmount,currency:t.currency||"KRW",paymentMethod:t.paymentMethod,reasons:t.reasons||[]},d=c.filter(h=>(t.diagnosis?.matchedRules||[]).includes(h.ruleId));return{input:n,diag:{level:t.diagnosis?.level||"none",score:t.diagnosis?.score||0,matchedRules:d,estimatedRecovery:t.diagnosis?.estimatedRecovery??null}}},ve=async(t,n,d)=>{await k(t,"submitted_agency",`${n.nameKr} ì ì${d?` (ì ìë²í¸ ${d})`:""}`,{submissions:[...t.submissions||[],{agencyId:n.agencyId,channel:n.channel?.type||"",mode:"assisted",sentAt:new Date().toISOString(),externalRefNo:d,status:"submitted"}],nextAction:{code:"await_agency",label:`${n.nameKr} ì²ë¦¬ ë기${n.slaDays?` (íì¤ ${n.slaDays}ì¼)`:""}`,dueAt:n.slaDays?new Date(Date.now()+n.slaDays*864e5).toISOString():null}})},we=m.useMemo(()=>{const t=(u?.matchedRules||[]).flatMap(n=>n.requiredEvidence||[]);return Array.from(new Set([...Je,...t]))},[u]),ae=m.useMemo(()=>p.filter(t=>(t.scope||[]).includes(l.category)||(t.scope||[]).includes("all")),[p,l.category]),Ae=()=>e.jsxs("div",{className:"flex items-center gap-1.5 justify-center my-3","aria-label":`ì§í ${x}/6`,children:[[1,2,3,4,5,6].map(t=>e.jsx("span",{className:"rounded-full",style:{width:t===x?"22px":"8px",height:"8px",transition:"width .2s",background:t<=x?"#2563eb":"#e5e7eb"}},t)),e.jsxs("span",{className:"text-xs text-gray-500 ml-2",children:[x,"/6"]})]}),T=t=>`w-full p-3 rounded-lg border-2 text-left transition-colors ${t?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,F=e.jsx("div",{className:"bg-white border-b border-gray-200",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-4 pt-3 pb-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("button",{onClick:()=>
14{if(a==="wizard"&&x>1){M(x-1);return}if(a!=="list"){r("list"),S().then(b);return}s("home")},className:"p-2 -ml-2 text-gray-700 hover:bg-gray-100 rounded-lg","aria-label":"ë¤ë¡ê°ê¸°",children:e.jsx(Ee,{className:"w-5 h-5"})}),a==="wizard"&&w.currentUser&&f&&e.jsx("button",{className:"text-xs text-gray-500 hover:text-gray-700",onClick:()=>{C(f,{status:"draft",...l},!1).catch(()=>{}),r("list")},children:"ììì ì¥íê³ ëê°ê¸°"})]}),e.jsxs("h1",{className:"text-lg font-bold text-gray-900 text-center flex items-center justify-center gap-1.5 mt-1",children:[e.jsx(Oe,{className:"w-5 h-5 text-blue-600"})," íë¶ ëì°ë¯¸"]}),a==="list"&&e.jsx("p",{className:"text-sm text-gray-500 text-center mt-1",children:"ìµì¸í ì·¨ì ììë£, í¬ê¸°íì§ ë§ì¸ì. 근거ì 길ì í¨ê» ì°¾ìë립ëë¤."})]})});if(a==="list")return e.jsxs("div",{className:"min-h-screen page-bg pb-[160px]",children:[F,e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-6 space-y-4",children:[e.jsx("button",{onClick:pe,className:"w-full p-5 rounded-xl text-white text-left shadow-md hover:shadow-lg transition-shadow",style:{background:"linear-gradient(135deg, #2563eb, #1d4ed8)"},children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-base",children:"íë¶ ê°ë¥ì± ì§ë¨í기"}),e.jsx("p",{className:"text-sm text-blue-100 mt-1",children:"6ê° ì§ë¬¸ · ì½ 2ë¶ â ë²ë ¹Â·ë¶ìê¸°ì¤ ê·¼ê±°ë¡ íì¸íë¤"})]}),e.jsx(Te,{className:"w-6 h-6 flex-shrink-0"})]})}),!w.currentUser&&e.jsx("p",{className:"text-xs text-gray-500 text-center",children:"ì§ë¨ì ë¡ê·¸ì¸ ìì´ ê°ë¥íë¤. ì¼ì´ì¤ ì ì¥Â·ì¶ì ì ë¡ê·¸ì¸ì´ íìíë¤."}),i.length>0&&e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-2",children:"ë´ ì¼ì´ì¤"}),e.jsx("div",{className:"space-y-2",children:i.map(t=>e.jsxs("button",{onClick:()=>{G(t),r("case"),window.scrollTo(0,0)},className:"w-full bg-white rounded-lg border border-gray-200 p-4 text-left hover:shadow-md transition-shadow",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-semibold text-gray-900",children:t.caseNo||t.id}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-blue-50 text-blue-700",children:me[t.status]||t.status})]}),e.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:[t.merchantName," · ",xe.find(n=>n.id===t.category)?.label||t.category]}),t.nextAction?.label&&e.jsxs("p",{className:"text-xs text-amber-700 mt-1",children:["ð ",t.nextAction.label]})]},t.id))})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4 text-xs text-gray-500 space-y-1",children:[e.jsxs("p",{className:"flex items-start gap-1.5",children:[e.jsx(I,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),E]}),e.jsx("p",{children:"ì구ìì 민ìì ë³¸ì¸ ëª
ìë¡ ë³¸ì¸ì´ ì ìí©ëë¤. ì´ì©ì 무ë£ì
ëë¤."})]})]})]});if(a==="case"&&_){const t=_,n=["diagnosed","submitted_merchant","submitted_agency","in_review","resolved_refunded"],d=["ì§ë¨","ì¬ì
ì ì구","ê¸°ê´ ì ì","ì²ë¦¬ ì¤","ìë£"],h=Math.max(n.indexOf(t.status),t.status?.startsWith("resolved")?4:0);return e.jsxs("div",{className:"min-h-screen page-bg pb-[160px]",children:[F,e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-6 space-y-4",children:[e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"font-bold text-gray-900",children:t.caseNo}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-blue-50 text-blue-700",children:me[t.status]||t.status})]}),e.jsx("div",{className:"flex items-center",children:d.map((g,N)=>e.jsxs("div",{className:"flex-1 flex flex-col items-center",children:[e.jsxs("div",{className:"flex items-center w-full",children:[e.jsx("div",{className:`flex-1 h-0.5 ${N===0?"bg-transparent":N<=h?"bg-blue-500":"bg-gray-200"}`}),N<=h?e.jsx(ne,{className:"w-5 h-5 text-blue-600 flex-shrink-0"}):e.jsx(le,{className:"w-5 h-5 text-gray-300 flex-shrink-0"}),e.jsx("div",{className:`flex-1 h-0.5 ${N===d.length-1?"bg-transparent":N<h?"bg-blue-500":"bg-gray-200"}`})]}),e.jsx("span",{className:`text-[10px] mt-1 ${N<=h?"text-blue-700":"text-gray-400"}`,children:g})]},g))})]}),t.nextAction?.label&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-amber-800",children:"ð ë¤ì í ì¼"}),e.jsx("p",{className:"text-sm text-amber-700 mt-1",children:t.nextAction.label}),t.nextAction.dueAt&&e.jsxs("p",{className:"text-xs text-amber-600 mt-1 flex items-center gap-1",children:[e.jsx(Le,{className:"w-3 h-3"}),"기ì¤ì¼ ",String(t.nextAction.dueAt).slice(0,10)]})]}),Array.isArray(t.timeline)&&t.timeline.length>0&&e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"font-bold text-gray-900 mb-2",children:"ð íìë¼ì¸"}),e.jsx("div",{className:"space-y-2",children:[...t.timeline].reverse().map((g,N)=>e.jsxs("div",{className:"flex gap-2 text-sm",children:[e.jsx("span",{className:"text-gray-400 flex-shrink-0",children:String(g.at).slice(5,10)}),e.jsx("span",{className:"text-gray-700",children:g.message})]},N))})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"font-bold text-gray-900 mb-2",children:"ìí ì
ë°ì´í¸"}),e.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"ì§í ìí©ì´ ë°ëë©´ ëë¬ ì£¼ì¸ì â ë¨ê³ì íìë¼ì¸ì 기ë¡ë©ëë¤."}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.status==="diagnosed"&&e.jsx("button",{onClick:()=>k(t,"submitted_merchant","ì¬ì
ìì íë¶ ì구ì ì ë¬",{nextAction:{code:"await_merchant",label:"ì¬ì
ì íì ë기 (7
14ì¼)",dueAt:new Date(Date.now()+7*864e5).toISOString()}}),className:"text-xs px-3 py-2 rounded-lg border border-blue-500 text-blue-600",children:"ì¬ì
ììê² ì구ì를 ë³´ëë¤"}),["submitted_agency","submitted_merchant","awaiting_merchant"].includes(t.status)&&e.jsx("button",{onClick:()=>k(t,"in_review","기ê´Â·ì¬ì
ì ì²ë¦¬ ì§í ì¤",{nextAction:{code:"in_review",label:"ì²ë¦¬ ê²°ê³¼ ë기",dueAt:null}}),className:"text-xs px-3 py-2 rounded-lg border border-blue-500 text-blue-600",children:"ì²ë¦¬ê° ììëë¤"}),!String(t.status).startsWith("resolved")&&t.status!=="rejected"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>k(t,"resolved_refunded","íë¶ ìë£ ð",{nextAction:null}),className:"text-xs px-3 py-2 rounded-lg bg-green-600 text-white",children:"íë¶ ìë£ëë¤"}),e.jsx("button",{onClick:()=>k(t,"resolved_partial","ì¼ë¶ íë¶ë¡ ì¢
ê²°",{nextAction:null}),className:"text-xs px-3 py-2 rounded-lg border border-green-600 text-green-700",children:"ì¼ë¶ë§ íë¶ë°ìë¤"}),e.jsx("button",{onClick:()=>k(t,"rejected","ê±°ì ë¨ â ë¤ì ë¨ê³(ë¤ë¥¸ 기ê´Â·ì¡°ì ) ê²í ",{}),className:"text-xs px-3 py-2 rounded-lg border border-gray-300 text-gray-600",children:"ê±°ì ë¹íë¤"})]})]})]}),!String(t.status).startsWith("resolved")&&(()=>{const g=new Set((t.submissions||[]).map(v=>v.agencyId)),{input:N,diag:Se}=Ne(t),re=p.filter(v=>v.automationTier==="B"&&!g.has(v.agencyId)&&((v.scope||[]).includes(t.category)||(v.scope||[]).includes("all")));return re.length===0?null:e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-gray-900 mb-1",children:"ë¤ë¥¸ 기ê´ì ì ìí기"}),e.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"í ê³³ìì í´ê²°ëì§ ìì¼ë©´ ë¤ë¥¸ 기ê´ìë ì ìí ì ìë¤."}),e.jsx("div",{className:"space-y-2",children:re.map(v=>e.jsx(ue,{agency:v,sections:oe(N,Se),onSubmitted:($e,ke)=>ve(t,$e,ke)},v.agencyId))})]})})(),Array.isArray(t.documents)&&t.documents.length>0&&e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("h3",{className:"font-bold text-gray-900 mb-2 flex items-center gap-1.5",children:[e.jsx(Be,{className:"w-4 h-4"}),"ë³´ë¸ ì구ì"]}),e.jsx("pre",{className:"text-xs text-gray-600 whitespace-pre-wrap bg-gray-50 rounded p-3 max-h-48 overflow-y-auto",children:t.documents[t.documents.length-1].body}),e.jsxs("button",{onClick:()=>z(t.documents[t.documents.length-1].body,"ì구ì"),className:"mt-2 text-sm text-blue-600 flex items-center gap-1",children:[e.jsx(W,{className:"w-3.5 h-3.5"}),"ë³µì¬"]})]}),e.jsxs("p",{className:"text-xs text-gray-400 flex items-start gap-1.5",children:[e.jsx(I,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),E]})]})]})}return e.jsxs("div",{className:"min-h-screen page-bg pb-[200px]",children:[F,e.jsxs("div",{className:"max-w-2xl mx-auto px-4",children:[e.jsx(Ae,{}),x===1&&e.jsxs("div",{className:"space-y-5 py-2",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-2",children:"무ìì ìì½íì
¨ëì?"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:xe.map(t=>e.jsxs("button",{className:T(l.category===t.id),onClick:()=>{if(!t.ready){$.info(`${t.label}ì ì¤ë¹ ì¤ì´ë¤. ê³§ ì´ë¦°ë¤.`);return}j({category:t.id})},style:t.ready?void 0:{opacity:.5},children:[e.jsx("div",{className:"text-xl",children:t.icon}),e.jsx("div",{className:"text-sm font-medium text-gray-900 mt-1",children:t.label}),!t.ready&&e.jsx("div",{className:"text-[10px] text-gray-400",children:"ì¤ë¹ ì¤"})]},t.id))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-2",children:"ì´ëì ìì½íì
¨ëì?"}),e.jsx("div",{className:"space-y-2",children:He.map(t=>e.jsxs("button",{className:T(l.merchantType===t.id),onClick:()=>j({merchantType:t.id}),children:[e.jsx("div",{className:"text-sm font-medium text-gray-900",children:t.label}),e.jsx("div",{className:"text-xs text-gray-500",children:t.desc})]},t.id))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-2",children:"ì¬ì
ì ì´ë¦"}),e.jsx("input",{type:"text",value:l.merchantName,onChange:t=>j({merchantName:t.target.value}),placeholder:"ì: í¸ë¦½ë·ì»´, ëííê³µ",className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px] focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),x===2&&e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsx("h2",{className:"font-bold text-gray-900",children:"ìì½Â·ê²°ì ì 보를 ìë ¤ì£¼ì
14¸ì"}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"ìì½ë²í¸ (ì í)"}),e.jsx("input",{type:"text",value:l.bookingRef||"",onChange:t=>j({bookingRef:t.target.value}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]",placeholder:"PNR / íì¸ë²í¸"})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"ê²°ì ì¼ì *"}),e.jsx("input",{type:"datetime-local",value:l.paidAt||"",onChange:t=>j({paidAt:t.target.value}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"ì·¨ì ìì² ì¼ì *"}),e.jsx("input",{type:"datetime-local",value:l.cancelRequestedAt||"",onChange:t=>j({cancelRequestedAt:t.target.value}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]"})]}),se&&e.jsxs("p",{className:"text-sm text-green-700 bg-green-50 border border-green-200 rounded-lg px-3 py-2",children:["ð¡ ",se]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"ì¶ë°ì¼ / ì²´í¬ì¸ì¼"}),e.jsx("input",{type:"date",value:l.serviceDate||"",onChange:t=>j({serviceDate:t.target.value}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"ê²°ì ê¸ì¡ *"}),e.jsx("input",{type:"number",inputMode:"numeric",value:l.paidAmount??"",onChange:t=>j({paidAmount:t.target.value?Number(t.target.value):void 0}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]",placeholder:"620000"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"íë¶ë°ì(ìì ) ê¸ì¡"}),e.jsx("input",{type:"number",inputMode:"numeric",value:l.refundedAmount??"",onChange:t=>j({refundedAmount:t.target.value?Number(t.target.value):void 0}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]",placeholder:"0"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"ê²°ì ìë¨"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:Ge.map(t=>e.jsx("button",{className:T(l.paymentMethod===t.id),onClick:()=>j({paymentMethod:t.id}),children:e.jsx("span",{className:"text-sm text-gray-900",children:t.label})},t.id))})]})]})]}),x===3&&e.jsxs("div",{className:"space-y-3 py-2",children:[e.jsx("h2",{className:"font-bold text-gray-900",children:"ì ì·¨ìíê² ëì
¨ëì?"}),e.jsx("p",{className:"text-sm text-gray-500",children:"í´ë¹íë ê²ì 모ë ì ííì¸ì â ì¬ì ê° ë§ììë¡ ê·¼ê±°ë ëì´ë©ëë¤."}),Ve.map(t=>{const n=l.reasons.includes(t.id);return e.jsxs("button",{className:T(n),onClick:()=>j({reasons:n?l.reasons.filter(d=>d!==t.id):[...l.reasons,t.id]}),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n?e.jsx(ne,{className:"w-4 h-4 text-blue-600 flex-shrink-0"}):e.jsx(le,{className:"w-4 h-4 text-gray-300 flex-shrink-0"}),e.jsx("span",{className:"text-sm text-gray-900",children:t.label})]}),n&&t.evidence&&e.jsxs("p",{className:"text-xs text-blue-700 mt-1.5 ml-6",children:["ð íì ì¦ë¹: ",t.evidence]})]},t.id)})]}),x===4&&u&&e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"rounded-xl border p-5",style:{background:R[u.level].bg,borderColor:R[u.level].color+"40"},children:[e.jsx("p",{className:"font-bold text-lg",style:{color:R[u.level].color},children:R[u.level].text}),e.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["â".repeat(Math.min(Math.ceil(u.score/25),5)),"â".repeat(Math.max(5-Math.ceil(u.score/25),0))," ","근거 ",u.matchedRules.length,"ê±´ ë°ê²¬"]}),u.estimatedRecovery!=null&&u.estimatedRecovery>0&&e.jsxs("div",{className:"mt-3 pt-3 border-t",style:{borderColor:R[u.level].color+"30"},children:[e.jsx("p",{className:"text-sm text-gray-600",children:"íì ê°ë¥ ììì¡"}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900",children:[u.estimatedRecovery.toLocaleStr
14ing("ko-KR"),l.currency==="KRW"?"ì":` ${l.currency}`]})]})]}),u.matchedRules.map((t,n)=>e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("p",{className:"font-semibold text-gray-900 text-sm",children:["⸠근거 ",n+1," · ",t.title]}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full flex-shrink-0 ${t.strength==="strong"?"bg-green-50 text-green-700":"bg-amber-50 text-amber-700"}`,children:t.strength==="strong"?"ê°":t.strength==="moderate"?"ì¤":"ì½"})]}),e.jsx("p",{className:"text-sm text-gray-600 mt-1.5",children:t.userExplain}),t.legalBasis&&(t.citationUrl?e.jsxs("a",{href:t.citationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 mt-1.5 inline-flex items-center gap-1",children:["â 근거 보기: ",t.legalBasis,e.jsx(ce,{className:"w-3 h-3"})]}):e.jsxs("p",{className:"text-xs text-gray-400 mt-1.5",children:["â 근거: ",t.legalBasis]}))]},t.ruleId)),u.level==="none"&&e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4 text-sm text-gray-700 space-y-2",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:"ê·¸ëë í´ë³¼ ì ìë ê²"}),e.jsx("p",{children:"· ì ì¤í ì ì² ìì² â ì¬ì ì ì¬ë ê°ë©´ ì¬ë¡ê° ìë¤ (ë¤ì ë¨ê³ìì ìì²ì를 ë§ë¤ì´ ì¤ë¤)"}),e.jsx("p",{children:"· ì í¨ê¸°ê° ë´ ì¬ë°ê¶Â·ì¼ì ë³ê²½ íì"}),e.jsx("p",{children:"· ì¬íìë³´íì ê°ì íë¤ë©´ ì·¨ì ë³´ì í목 íì¸"})]}),e.jsxs("p",{className:"text-xs text-gray-400 flex items-start gap-1.5",children:[e.jsx(I,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),E]})]}),x===5&&e.jsxs("div",{className:"space-y-3 py-2",children:[e.jsx("h2",{className:"font-bold text-gray-900",children:"ì¦ë¹ì ì¤ë¹í´ 주ì¸ì"}),e.jsxs("p",{className:"text-sm text-gray-500",children:['ì§ê¸ ìì´ë ê´ì°®ë¤ â "ëì¤ì"ë¡ ëê³ ì§íí ì ìë¤.',e.jsx("br",{}),"â ï¸ ì¹´ëë²í¸Â·ì£¼ë¯¼ë²í¸ë ê°ë¦¬ê³ ì¤ë¹íì¸ì."]}),we.map(t=>{const n=ge[t]||"later";return e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-3",children:[e.jsx("p",{className:"text-sm text-gray-900 mb-2",children:t}),e.jsx("div",{className:"flex gap-2",children:[["ready","ì¤ë¹ë¨"],["later","ëì¤ì"],["na","í´ë¹ìì"]].map(([d,h])=>e.jsx("button",{onClick:()=>ee(g=>({...g,[t]:d})),className:`text-xs px-3 py-1.5 rounded-full border ${n===d?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-600 border-gray-300"}`,children:h},d))})]},t)})]}),x===6&&u&&e.jsxs("div",{className:"space-y-5 py-2",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-1",children:"â ì¬ì ììê² íë¶ ì구ì ë³´ë´ê¸°"}),e.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"ë´ì©ì íì¸íê³ ìì ë¡ê² ìì íì¸ì. ë³¸ì¸ ëª ìë¡ ë³´ë´ë 문ìì ëë¤."}),e.jsx("input",{value:te,onChange:t=>B(t.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-300 text-[16px] font-medium mb-2"}),e.jsx("textarea",{value:K,onChange:t=>q(t.target.value),rows:12,className:"w-full px-3 py-2 rounded-lg border border-gray-300 text-[16px] leading-relaxed"}),e.jsxs("button",{onClick:()=>{z(`${te} 15 16${K}`,"ì구ì"),fe("ë³µì¬")},className:"w-full mt-2 py-2.5 rounded-lg bg-blue-600 text-white text-sm font-medium flex items-center justify-center gap-1.5",children:[e.jsx(W,{className:"w-4 h-4"}),"ë³µì¬í기"]}),e.jsx("p",{className:"text-xs text-gray-500 mt-1.5",children:"ë³µì¬í ë´ì©ì ì¬ì ì ê³ ê°ì¼í° ì´ë©ì¼ì´ë 문ì ê²ìíì ë¶ì¬ë£ì´ ë³´ë´ì¸ì."}),e.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"7ì¼ ìì íì ì´ ìì¼ë©´ ìë ê¸°ê´ ì ìë¡ ëì´ê°ì¸ì."})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-1",children:"â¡ í´ê²°ëì§ ìì¼ë©´ â ê¸°ê´ ì ì"}),e.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"ìì±ë ë´ì©ì ë³µì¬í´ ì¤ë¤. ì ìë 본ì¸ì¸ì¦ í 본ì¸ì´ íë¤."}),e.jsx("div",{className:"space-y-2",children:ae.filter(t=>t.automationTier==="B").map(t=>e.jsx(ue,{agency:t,sections:oe(l,u),onSubmitted:je},t.agencyId))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-1",children:"⢠ìì§ í´ê²°ëì§ ìì¼ì ¨ëì?"}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4 space-y-2.5 text-sm",children:[ae.filter(t=>t.automationTier==="C").map(t=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-900",children:t.nameKr}),t.jurisdictionNote&&e.jsx("p",{className:"text-xs text-gray-500",children:t.jurisdictionNote})]}),t.channel?.phone?e.jsxs("a",{href:`tel:${t.channel.phone}`,className:"text-blue-600 text-xs flex items-center gap-1 flex-shrink-0",children:[e.jsx(Ie,{className:"w-3 h-3"}),t.channel.phone]}
16):t.channel?.url?e.jsxs("a",{href:t.channel.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 text-xs flex items-center gap-1 flex-shrink-0",children:["ê³µì ìë´",e.jsx(ce,{className:"w-3 h-3"})]}):null]},t.agencyId)),e.jsx("p",{className:"text-xs text-gray-500 pt-2 border-t border-gray-100",children:"â» ì ì²ì ìì±ì ê° ê¸°ê´ ìë´ì ë°ë¼ 본ì¸ì´ ì§ííì
ì¼ í©ëë¤. ìì±ì´ ì´ë ¤ì°ë©´ ëíë²ë¥ 구조공ë¨(â132) ë± ê³µì ìë´ì ì´ì©íì¸ì."})]})]}),e.jsxs("p",{className:"text-xs text-gray-400 flex items-start gap-1.5",children:[e.jsx(I,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),E]}),w.currentUser&&f&&e.jsx("button",{onClick:()=>{r("list"),S().then(b)},className:"w-full py-3 rounded-lg border border-gray-300 text-gray-700 text-sm",children:"ë´ ì¼ì´ì¤ë¡ ì´ë â ì§í ìí©ì ì¶ì í ê²ì"})]}),x<6&&e.jsxs("div",{className:"flex gap-2 py-5",children:[x>1&&e.jsx("button",{onClick:()=>M(x-1),className:"flex-1 py-3 rounded-lg border border-gray-300 text-gray-700 text-sm",children:"ì´ì "}),e.jsx("button",{disabled:!be,onClick:()=>{x===3&&ye(),M(x+1),window.scrollTo(0,0)},className:"flex-1 py-3 rounded-lg text-white text-sm font-medium disabled:opacity-40",style:{background:"#2563eb"},children:x===3?"ì§ë¨ ê²°ê³¼ 보기":"ë¤ì"})]})]})]})}function ue({agency:s,sections:a,onSubmitted:r}){const[c,o]=m.useState(!1),[p,y]=m.useState("");return e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-semibold text-gray-900 flex items-center gap-1.5",children:[e.jsx(Ke,{className:"w-4 h-4 text-blue-600"}),s.nameKr]}),e.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[s.jurisdictionNote||"",s.slaDays?` · íì¤ ì²ë¦¬ ${s.slaDays}ì¼`:""]})]}),e.jsx("button",{onClick:()=>o(!c),className:"text-xs px-3 py-1.5 rounded-lg bg-blue-600 text-white flex-shrink-0",children:c?"ì 기":"ìì ì´ê¸°"})]}),c&&e.jsxs("div",{className:"mt-3 space-y-2",children:[a.map(i=>e.jsxs("div",{className:"bg-gray-50 rounded-lg p-2.5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-600",children:i.label}),e.jsxs("button",{onClick:()=>z(i.text,i.label),className:"text-xs text-blue-600 flex items-center gap-1",children:[e.jsx(W,{className:"w-3 h-3"}),"ë³µì¬"]})]}),e.jsx("p",{className:"text-xs text-gray-700 whitespace-pre-wrap max-h-24 overflow-y-auto",children:i.text})]},i.label)),s.channel?.url&&e.jsxs("a",{href:s.channel.deepLink||s.channel.url,target:"_blank",rel:"noopener noreferrer",className:"block text-center py-2.5 rounded-lg border border-blue-600 text-blue-600 text-sm font-medium",children:["ì ì íì´ì§ ì´ê¸° ",s.requiresIdentityVerification?"(본ì¸ì¸ì¦ íì)":""]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:p,onChange:i=>y(i.target.value),placeholder:"ì ìë²í¸ (ì í)",className:"flex-1 px-3 py-2 rounded-lg border border-gray-300 text-[16px]"}),e.jsx("button",{onClick:()=>r(s,p),className:"px-4 py-2 rounded-lg bg-green-600 text-white text-xs font-medium",children:"ì ìíë¤"})]})]})]})}export{it as RefundHelperPage};
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.