import{m as a,t as g,n as x,v as y,k as w,r as h,a7 as L,a8 as b,ao as v,ce as P,ah as k,j as t,z as $,a4 as A}from"./index-E0AVXOTn.js";const C=a.div(["display:flex;flex-direction:column;gap:4px;"]),E=a.div(["width:fit-content;"]),M=a.ul(["display:flex;flex-direction:column;gap:4px;margin-top:4px;"]),z=a.p(["color:",";",";line-height:16px;position:relative;width:fit-content;white-space:break-word;word-break:break-all;overflow-wrap:break-word;padding-right:8px;","{",";}"],g.darkGray,x(12),y.SM,x(14)),r={Container:C,AccordionContainer:E,ProductOptionList:M,ProductOption:z},Q=({optionTitle:c="",optionName:i="",optionValue:s="",productName:l="",inputs:p,orderCnt:u=0,containerStyle:f,optionTextStyle:o,isOpenAccordion:m=!1})=>{const{t:j}=w(),d=h.useMemo(()=>c||(i&&s?i===s?s:`${i}: ${s}`:""),[c,i,s]),n=h.useMemo(()=>L(p||[],k(e=>e.inputValue?`${e.inputLabel}: ${e.inputValue}`:""),P([d===l?"":d]),v(e=>!!e),b),[d,l,p]);return t.jsxs(r.Container,{style:f,children:[!$(n)&&(n.length>1?t.jsx(r.AccordionContainer,{children:t.jsx(A,{type:"single",defaultValue:m?"optionLabels":void 0,items:[{value:"optionLabels",header:t.jsx(r.ProductOption,{style:o,children:n[0]}),content:t.jsx(r.ProductOptionList,{children:n.slice(1).map((e,O)=>t.jsx("li",{children:t.jsx(r.ProductOption,{style:o,children:e})},`${e}-${O}`))})}]})}):t.jsx(r.ProductOption,{style:o,children:n[0]})),!!u&&t.jsxs(r.ProductOption,{style:o,children:[j("수량")," ",u.toLocaleString()]})]})};export{Q as O};