import{j as t,r as o}from"./react-B_SyE9nW.js";import{S as e,o as r,j as s,m as a,n,w as i,y as c}from"./index-Flm6m8Wj.js";import{B as x,M as d}from"./index-C6Ujt1Uk.js";import{P as l}from"./BagIco-BQpC9Odt.js";import{u}from"./embla-carousel-react.esm-NewS-kch.js";import{a as p}from"./SortProductReview-D60BYAkB.js";function m(o){return t.jsx(e,{...o,viewBox:"0 0 26 7",children:t.jsx("path",{d:"M26 2.1V0L13 4.6 0 0v2.1L13 7z"})})}function j(o){return t.jsx(e,{...o,viewBox:"0 0 26 7",children:t.jsx("path",{d:"M26 4.9V7L13 2.4 0 7V4.9L13 0z"})})}const f={width:"100%","& .MuiSvgIcon-root":{color:"var(--btn-expand-color)"}};const h=r((function({onClick:o,expanded:e,color:r="gray50"}){return t.jsx(x,{onClick:o,sx:f,style:{"--btn-expand-color":s[r]},className:"enj-btn-expand",children:e?t.jsx(m,{}):t.jsx(j,{})})})),g={"& .MuiDialog-paper":{width:"fit-content",maxWidth:"none",minWidth:"322px"},"& .MuiDialogContent-root":{"@media(max-width:768px)":{px:"15px"}}};const w=r((function(){const e=o.useContext(l),{loadData:r,clear:s}=e,x=u();return o.useLayoutEffect((()=>{if(a.isRateProduct){const t=x.get("productSlug");t&&r({slug:t})}}),[x,a.isRateProduct]),o.useLayoutEffect((()=>()=>{s()}),[x]),t.jsx(d,{open:a.isRateProduct,onClose:()=>{i(),x.delete("productSlug"),c.replace({search:x.toString()})},sx:g,title:n("reviews"),marginTitle:"0",centerText:!1,children:t.jsx(p,{forModal:!0})})}));export{h as B,w as R};