1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3712],{23712:(e,l,t)=>{t.r(l),t.d(l,{default:()=>m});var n=t(95155),d=t(3447),i=t(12115),s=t(73597),a=t(56803),r=t(54323),c=t(34620),o=t(87259),u=t(26664);let m=e=>{var l;let{inStockProvinceObject:t}=e,m=(0,c.G)(u.F6),h=(0,c.G)(e=>e.location.listProvinces),x=(0,c.G)(e=>e.product.childProducts),p=(0,c.G)(u.KQ),v=(0,c.G)(e=>e.product.modals.inStockProvinces),g=(0,o.j)(),{handleChangeProvince:b}=(0,a.$)(),{handleSelectChildProduct:f}=(0,r.ot)(),[j,N]=(0,i.useState)((null==m||null==(l=m.general)?void 0:l.product_id)||p),[k,_]=(0,i.useState)(null),w=x.filter(e=>{var l;let n=(null==(l=e.general)?void 0:l.product_id)||p;return!!n&&((null==t?void 0:t[n])||[]).length>0}),C=(0,i.useMemo)(()=>{let e=null==t?void 0:t[j];return h.filter(l=>null==e?void 0:e.includes(l.id))},[j,t,h]),S=e=>{g(u.L.setOpenInStockProvincesModal(e))};return(0,i.useEffect)(()=>{j&&!C.some(e=>e.id===(null==k?void 0:k.id))&&_(null)},[j,C,k]),(0,n.jsx)(d.Dialog,{open:v,onOpenChange:S,title:"Xem tá»nh c\xf2n h\xe0ng",className:"w-[95vw] max-w-150 px-0",withCloseButton:!1,classNameTitle:"text-center pb-4 border-b border-neutral-200 text-md md:text-xl",footer:(0,n.jsxs)("div",{className:"flex w-full gap-2 px-4 pt-4",children:[(0,n.jsx)(d.Button,{variant:"neutral",appearance:"outline",onClick:()=>S(!1),className:"flex-1",children:"Ä\xf3ng"}),(0,n.jsx)(d.Button,{disabled:!k,onClick:()=>{var e;m&&(null==(e=m.general)?void 0:e.product_id)!==j&&f(j),k&&b(k,{closeInStockModal:!0})},className:"flex-1",children:"X\xe1c nháºn"})]}),children:(0,n.jsxs)("div",{className:"max-h-[50vh] min-h-50 overflow-auto px-4 pt-4",children:[w.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"md:text-md mb-2 text-base font-semibold",children:"Chá»n m\xe0u sắc"}),(0,n.jsx)("div",{className:"mb-4 grid grid-cols-2 gap-2 md:grid-cols-3",children:w.map(e=>{var l,t,d,i;return(0,n.jsxs)(s.Fu,{onClick:()=>{var l,t;return(null==(l=e.general)?void 0:l.product_id)&&N(null==(t=e.general)?void 0:t.product_id)},isSelected:j===(null==(l=e.general)?void 0:l.product_id),className:"flex flex-row items-center gap-2 py-1",children:[(0,n.jsx)(s.HF,{width:80,height:80,src:"https://cellphones.com.vn/media/catalog/product".concat(e.filterable.thumbnail),alt:"thumbnail",className:"size-10"}),(0,n.jsx)("span",{className:"text-base font-medium",children:null==(d=e.general)||null==(t=d.attributes)?void 0:t.color})]},null==(i=e.general)?void 0:i.product_id)})})]}),(0,n.jsx)("div",{className:"md:text-md mb-2 text-base font-semibold",children:"Chá»n tá»nh c\xf2n h\xe0ng"}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-2 md:grid-cols-3",children:C.map(e=>(0,n.jsx)(s.Fu,{isSelected:(null==k?void 0:k.id)===e.id,onClick:()=>_(e),children:(0,n.jsx)("span",{className:"text-center text-base",children:e.name})},e.id))})]})})}}}]);
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.