import{r as d,j as e,L as F,R as J}from"./vendor-react-C630P38J.js";import"./vendor-utils-Cb1MAKRV.js";import{b9 as X,ba as Y,h as U,J as ee,c as x,Q as ae,a3 as j,az as se,a4 as te,j as q,cR as re,dW as ne,u as P,t as K,dX as oe,B as g}from"./feature-order-C2we0F5o.js";import{P as ie}from"./vendor-overlay-B61Jbn6n.js";import{L as O,c as ce,d as de}from"./useProductSectionProductList-DB50oUuG.js";import{p as le,t as ue,m as me,q as pe}from"./vendor-fxts-IS4CCBC4.js";import{S as y,b as I}from"./vendor-swiper-CwUwDtZu.js";import{f as B}from"./vendor-query-BjC2S-sR.js";import{f as ve,h as xe}from"./index-nim7WYfB.js";import{u as je}from"./vendor-i18n-D_F5k183.js";const he=({searchParams:a,options:s})=>B({queryKey:X.detailByProductNos(a),queryFn:async()=>{const{data:n}=await Y.getProductsInfoByProductNos(a);return n},...s}),Ne=a=>d.createElement("svg",{width:23,height:29,viewBox:"0 0 23 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},d.createElement("path",{d:"M7.33398 6.6527V4.76847C7.33398 2.6872 8.97561 1 11.0007 1C13.0257 1 14.6673 2.6872 14.6673 4.76847V6.6527",stroke:"black",strokeWidth:2,strokeLinecap:"round"}),d.createElement("path",{d:"M2.1817 8.59362C2.2128 8.06506 2.6505 7.65234 3.17998 7.65234H19.048C19.5717 7.65234 20.0067 8.05635 20.0453 8.5786L21.3762 26.5786C21.4191 27.1584 20.9603 27.6523 20.379 27.6523H2.12111C1.54574 27.6523 1.08905 27.168 1.12284 26.5936L2.1817 8.59362Z",stroke:"black",strokeWidth:2})),fe=a=>d.createElement("svg",{width:14,height:19,viewBox:"0 0 14 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},d.createElement("path",{d:"M4.66797 4.59717V3.39812C4.66797 2.07367 5.71264 1 7.0013 1C8.28997 1 9.33464 2.07367 9.33464 3.39812V4.59717",stroke:"white",strokeWidth:2,strokeLinecap:"round"}),d.createElement("path",{d:"M2.68991 5.59766H11.1317C11.6554 5.59766 12.0904 6.00167 12.129 6.52392L12.8439 16.1932C12.8868 16.7729 12.428 17.2669 11.8467 17.2669H2.12111C1.54574 17.2669 1.08905 16.7826 1.12284 16.2082L1.69164 6.53893C1.72273 6.01037 2.16044 5.59766 2.68991 5.59766Z",fill:"black",fillOpacity:.12,stroke:"white",strokeWidth:2}));var we="_10olj101",_e="_10olj102",be="_10olj103",Se="_10olj104",$="_10olj105",Pe="_10olj106",V="_10olj107",S={like:"_10olj108",default:"_10olj109"},z="_10olj10a",ge="_10olj10b",ye="_10olj10c",Ie="_10olj10d",Be="_10olj10e",Ce="_10olj10f",Le="_10olj10g",Ee="_10olj10h";const v=d.memo(({liked:a,productNo:s,salePrice:n,immediateDiscountAmt:t,additionDiscountAmt:l,productImageComponent:c,brandNameComponent:r,productNameComponent:m,productPriceComponent:o,productReviewComponent:N,imageUrls:i,brandName:h,brandNameKo:C,brandNameEn:L,brandNameType:f,reviewRating:E,promotionText:A,productName:R,productInformationClassName:G,style:H,isSoldOut:w,rank:_,isChecked:Q,onProductCheckClick:u,isMobile:p,isVisibleActions:T=!0,isVisiblePromotionText:Z})=>{const D=b=>{b.preventDefault(),ie.open(M=>p?e.jsx(re,{productNo:s,...M}):e.jsx(ne,{productNo:s,...M}))},k=d.useMemo(()=>f==="NAME_KO"?C||h:f==="NAME_EN"&&L||h,[f,C,L,h]);return e.jsxs(F,{className:we,style:H,to:`${U.PRODUCTS.MAIN}/${s}`,children:[e.jsxs("div",{className:be,children:[u&&e.jsx("label",{className:_e,onClick:b=>{b.preventDefault(),u==null||u(s)},children:e.jsx(ee,{variant:"imageOverlay",id:`${s}`,checked:Q,onCheckedChange:()=>{u==null||u(s)}})}),T&&!p&&!w&&e.jsx("div",{className:x($,"layer","hover-layer"),children:e.jsxs("div",{className:V,children:[e.jsx(O,{isMobile:p,liked:a,productNo:s,variant:"product-card",size:"large",className:a?S.like:S.default}),e.jsx("button",{className:S.default,onClick:D,children:e.jsx(Ne,{})})]})}),w&&e.jsx("div",{className:x($,p?void 0:"layer hover-layer"),children:e.jsx("div",{className:Pe,children:e.jsx("p",{children:"SOLD OUT"})})}),c??e.jsxs("div",{className:x(Se,"layer","primary-layer"),children:[_&&e.jsx("span",{className:x(Le,_<=3?Ee:void 0),children:_}),e.jsx(ae,{src:j(i==null?void 0:i[0],700,700),srcSet:[`${j(i==null?void 0:i[0],300,300)} 300w`,`${j(i==null?void 0:i[0],450,450)} 450w`,`${j(i==null?void 0:i[0],600,600)} 600w`,`${j(i==null?void 0:i[0],700,700)} 700w`].join(", "),alt:R})]}),T&&p&&e.jsxs("div",{className:V,children:[e.jsx(O,{isMobile:p,liked:a,productNo:s,variant:"product-card",size:"small",className:z}),e.jsx("button",{disabled:w,className:z,onClick:D,children:e.jsx(fe,{})})]})]}),e.jsxs("div",{className:x(ge,G),children:[!!k&&(r??e.jsx("p",{className:ye,children:k})),m??e.jsx("p",{className:Ie,children:R}),Z&&!!A&&e.jsx("p",{className:Be,children:A}),o??e.jsx(se,{salePrice:n,immediateDiscountAmt:t,additionDiscountAmt:l}),!!E&&(N??e.jsxs("div",{className:Ce,children:[e.jsx(te,{color:q.primary,size:16,fill:q.primary}),e.jsx("span",{children:E??0})]}))]})]})});v.displayName="PureProductCard";var Ae="_1rla7zn0";const Re=({isMobile:a,products:s,showRank:n=!1})=>e.jsx("div",{className:Ae,children:s.map((t,l)=>e.jsx(v,{isMobile:a,rank:n?l+1:void 0,...t},t.productNo))}),Te=J.memo(Re),De=a=>`AD_${a}`,ke=({sectionId:a,options:s})=>B(ce({sectionId:a,options:s})),Me=({type:a="id",sectionId:s,searchParams:n,options:t})=>B(de({type:a,sectionId:s,searchParams:n,options:t}));var qe="_3avxo0",Oe="_3avxo1",$e="_3avxo2",Ve="_3avxo3",ze="_3avxo4",We="_3avxo5",Ke="_3avxo6",Ge="_3avxo7";const He=({categoryNo:a})=>{const{isMobile:s}=P(),n=De(a),{data:t}=ke({sectionId:n,options:{retry:!1}}),{data:l}=Me({type:"id",sectionId:n,searchParams:{by:"ADMIN_SETTING",direction:"DESC",soldout:!0,saleStatus:"ONSALE",hasOptionValues:!1,includeStopProduct:!1,hasTotalCount:!0,pageNumber:1,pageSize:30},options:{retry:!1}}),c=d.useMemo(()=>le(l.products??[],me(K),ue),[l.products]);if(c.length===0)return null;const r=s?c.length>2:c.length>4;return e.jsxs("section",{className:qe,"aria-label":"광고 상품 진열",children:[e.jsxs("div",{className:Oe,children:[e.jsxs("div",{className:$e,children:[e.jsx("h2",{className:Ve,children:t.label}),!!t.promotionText&&e.jsx("p",{className:ze,children:t.promotionText})]}),e.jsxs("span",{className:We,children:["광고",e.jsx(oe,{"aria-hidden":!0,size:14,strokeWidth:1.5})]})]}),e.jsx(y,{className:Ke,enabled:r,slidesPerView:2.3,spaceBetween:10,breakpoints:{[g.SM+1]:{slidesPerView:4.2,spaceBetween:15}},children:c.map(m=>e.jsx(I,{className:Ge,children:e.jsx(v,{isMobile:s,...m})},m.productNo))})]})};var Qe="_13qwtxd0",Ze="_13qwtxd1",Fe="_13qwtxd2",Je="_13qwtxd3",W="_13qwtxd4",Xe="_13qwtxd5",Ye="_13qwtxd6";const Ue=({title:a,products:s})=>{const{isMobile:n}=P(),t=d.useRef(null),[l,c]=d.useState(!0),[r,m]=d.useState(!1);return s.length===0?null:e.jsxs("div",{className:Qe,children:[e.jsxs("div",{className:Ze,children:[e.jsx("h2",{className:Fe,children:a}),!n&&e.jsxs("div",{className:Je,children:[e.jsx("button",{type:"button",className:W,onClick:()=>{var o;return(o=t.current)==null?void 0:o.slidePrev()},disabled:l,"aria-label":"이전 랭킹 상품",children:e.jsx(ve,{})}),e.jsx("button",{type:"button",className:W,onClick:()=>{var o;return(o=t.current)==null?void 0:o.slideNext()},disabled:r,"aria-label":"다음 랭킹 상품",children:e.jsx(xe,{})})]})]}),e.jsx(y,{className:Xe,slidesPerView:2,spaceBetween:10,breakpoints:{[g.SM+1]:{slidesPerView:4,spaceBetween:15}},onBeforeInit:o=>{t.current=o},onSlideChange:o=>{c(o.isBeginning),m(o.isEnd)},children:s.map((o,N)=>e.jsx(I,{className:Ye,children:e.jsx(v,{isMobile:n,rank:N+1,...o})},`RANK-${o.productNo}`))})]})};var ea="o9q8mg0",aa="o9q8mg1",sa="o9q8mg2";const ta={slidesPerView:2.3,spaceBetween:5,breakpoints:{[g.SM]:{slidesPerView:4.5,spaceBetween:15}}},ra=({productNos:a})=>{const{t:s}=je(),{isMobile:n}=P(),{data:t}=he({searchParams:{productNos:a}}),l=d.useMemo(()=>{var c;return(c=t==null?void 0:t.products)==null?void 0:c.map(r=>K({productNo:r.baseInfo.productNo,liked:r.baseInfo.liked,brandName:r.baseInfo.brandName,productName:r.baseInfo.productName,brandNameKo:r.baseInfo.brandNameKo,brandNameEn:r.baseInfo.brandNameEn,brandNameType:r.baseInfo.brandNameType,reviewRating:r.baseInfo.reviewRating,listImageUrls:r.baseInfo.listImageUrls,salePrice:r.price.salePrice,immediateDiscountAmt:r.price.immediateDiscountAmt,additionDiscountAmt:r.price.additionDiscountAmt}))},[t]);return pe(l)?null:e.jsxs("section",{className:ea,children:[e.jsx("h4",{className:aa,children:s("다른 고객들이 많이 본 상품")}),e.jsx(y,{...ta,className:sa,children:l.map(c=>e.jsx(I,{children:e.jsx(v,{...c,isRelatedProduct:!0,isMobile:n})},c.productNo))})]})};var xa="_1gp4fcv0",ja="_1gp4fcv1",ha="_1gp4fcv2",Na="_1gp4fcv3",fa="_1gp4fcv4",wa="_1gp4fcv5",_a="_1gp4fcv6";const ba=Object.freeze(Object.defineProperty({__proto__:null,ProductCardGrid:Te,ProductListAdvertisementSection:He,ProductRankList:Ue,PureProductCard:v,RelatedProductList:ra},Symbol.toStringTag,{value:"Module"}));export{v as P,Na as a,fa as b,wa as c,ha as d,Te as e,Ue as f,He as g,ba as i,xa as l,_a as p,ja as s};