(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[872],{5492:function(e,s,a){Promise.resolve().then(a.t.bind(a,413,23)),Promise.resolve().then(a.t.bind(a,8326,23)),Promise.resolve().then(a.bind(a,9587)),Promise.resolve().then(a.bind(a,1529)),Promise.resolve().then(a.bind(a,581))},5986:function(e,s,a){"use strict";var l=a(7437);a(2265);var i=a(9641),t=a.n(i);s.Z=e=>{let{pageCount:s,onPageChange:a}=e;return(0,l.jsx)(t(),{previousLabel:"<",nextLabel:">",pageCount:s,pageRangeDisplayed:3,marginPagesDisplayed:2,onPageChange:e=>a(e.selected),containerClassName:"pagination",activeClassName:"active"})}},581:function(e,s,a){"use strict";a.r(s);var l=a(7437),i=a(2265),t=a(6691),n=a.n(t),r=a(1396),c=a.n(r),o=a(9267),d=a(9981),m=a(589),p=a(5963);a(2353);var x=a(5986);s.default=e=>{let s,{data:a,productPerPage:t,dataType:r}=e,[u,h]=(0,i.useState)(4),[g,j]=(0,i.useState)(!1),[f,N]=(0,i.useState)(""),[b,v]=(0,i.useState)(!1),[y,w]=(0,i.useState)(r),[k,C]=(0,i.useState)(),[S,P]=(0,i.useState)(),[z,L]=(0,i.useState)(),[H,T]=(0,i.useState)({min:0,max:100}),[_,F]=(0,i.useState)(0),X=_*t,D=e=>{h(e)},E=e=>{N(e),F(0)},M=e=>{w(s=>s===e?null:e),F(0)},Z=a.filter(e=>{let s=!0;g&&(s=e.sale);let a=!0;r&&(a=e.type===r);let l=!0;y&&(r=y,l=e.type===y);let i=!0;k&&(i=e.sizes.includes(k));let t=!0;(0!==H.min||100!==H.max)&&(t=e.price>=H.min&&e.price<=H.max);let n=!0;S&&(n=e.variation.some(e=>e.color===S));let c=!0;return z&&(c=e.brand===z),s&&a&&l&&i&&n&&c&&t&&"fashion"===e.category}),q=[...Z];"soldQuantityHighToLow"===f&&(Z=q.sort((e,s)=>s.sold-e.sold)),"discountHighToLow"===f&&(Z=q.sort((e,s)=>Math.floor(100-s.price/s.originPrice*100)-Math.floor(100-e.price/e.originPrice*100))),"priceHighToLow"===f&&(Z=q.sort((e,s)=>s.price-e.price)),"priceLowToHigh"===f&&(Z=q.sort((e,s)=>e.price-s.price));let B=Z.length;0===Z.length&&(Z=[{id:"no-data",category:"no-data",type:"no-data",name:"no-data",gender:"no-data",new:!1,sale:!1,rate:0,price:0,originPrice:0,brand:"no-data",sold:0,quantity:0,quantityPurchase:0,sizes:[],variation:[],thumbImage:[],images:[],description:"no-data",action:"no-data",slug:"no-data"}]);let O=Math.ceil(Z.length/t);0===O&&F(0),s=Z.length>0?Z.slice(X,X+t):[];let Q=["top","dress","mukena","gamis","kaftan","rok"];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"breadcrumb-block style-img",children:(0,l.jsx)("div",{className:"breadcrumb-main bg-linear overflow-hidden",children:(0,l.jsxs)("div",{className:"container lg:pt-[134px] pt-24 pb-10 relative",children:[(0,l.jsxs)("div",{className:"main-content w-full h-full flex flex-col items-center justify-center relative z-[1]",children:[(0,l.jsxs)("div",{className:"text-content",children:[(0,l.jsx)("div",{className:"heading2 text-center",children:null===r?"Shop":r}),(0,l.jsxs)("div",{className:"link flex items-center justify-center gap-1 caption1 mt-3",children:[(0,l.jsx)(c(),{href:"/",children:"Homepage"}),(0,l.jsx)(o.T,{size:14,className:"text-secondary2"}),(0,l.jsx)("div",{className:"text-secondary2 capitalize",children:null===r?"Shop":r})]})]}),(0,l.jsx)("div",{className:"list-tab flex flex-wrap items-center justify-center gap-y-5 gap-8 lg:mt-[70px] mt-12 overflow-hidden",children:Q.map((e,s)=>(0,l.jsx)("div",{className:"tab-item text-button-uppercase cursor-pointer has-line-before line-2px ".concat(r===e?"active":""),onClick:()=>M(e),children:e},s))})]}),(0,l.jsx)("div",{className:"bg-img absolute top-2 -right-6 max-lg:bottom-0 max-lg:top-auto w-1/3 max-lg:w-[26%] z-[0] max-sm:w-[45%]",children:(0,l.jsx)(n(),{src:"/images/slider/bg1-1.png",width:1e3,height:1e3,alt:"",className:""})})]})})}),(0,l.jsx)("div",{className:"shop-product breadcrumb1 lg:py-20 md:py-14 py-10",children:(0,l.jsx)("div",{className:"container",children:(0,l.jsxs)("div",{className:"list-product-block relative",children:[(0,l.jsxs)("div",{className:"filter-heading flex items-center justify-between gap-5 flex-wrap",children:[(0,l.jsxs)("div",{className:"left flex has-line items-center flex-wrap gap-5",children:[(0,l.jsxs)("div",{className:"choose-layout flex items-center gap-2",children:[(0,l.jsx)("div",{className:"item three-col p-2 border border-line rounded flex items-center justify-center cursor-pointer ".concat(3===u?"active":""),onClick:()=>D(3),children:(0,l.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"})]})}),(0,l.jsx)("div",{className:"item four-col p-2 border border-line rounded flex items-center justify-center cursor-pointer ".concat(4===u?"active":""),onClick:()=>D(4),children:(0,l.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"})]})}),(0,l.jsx)("div",{className:"item five-col p-2 border border-line rounded flex items-center justify-center cursor-pointer ".concat(5===u?"active":""),onClick:()=>D(5),children:(0,l.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"}),(0,l.jsx)("span",{className:"w-[3px] h-4 bg-secondary2 rounded-sm"})]})})]}),(0,l.jsxs)("div",{className:"check-sale flex items-center gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",name:"filterSale",id:"filter-sale",className:"border-line",onChange:()=>{j(e=>!e),F(0)}}),(0,l.jsx)("label",{htmlFor:"filter-sale",className:"cation1 cursor-pointer",children:"Show only products on sale"})]})]}),(0,l.jsxs)("div",{className:"right flex items-center gap-3",children:[(0,l.jsx)("label",{htmlFor:"select-filter",className:"caption1 capitalize",children:"Sort by"}),(0,l.jsxs)("div",{className:"select-block relative",children:[(0,l.jsxs)("select",{id:"select-filter",name:"select-filter",className:"caption1 py-2 pl-3 md:pr-20 pr-10 rounded-lg border border-line",onChange:e=>{E(e.target.value)},defaultValue:"Sorting",children:[(0,l.jsx)("option",{value:"Sorting",disabled:!0,children:"Sorting"}),(0,l.jsx)("option",{value:"soldQuantityHighToLow",children:"Best Selling"}),(0,l.jsx)("option",{value:"discountHighToLow",children:"Best Discount"}),(0,l.jsx)("option",{value:"priceHighToLow",children:"Price High To Low"}),(0,l.jsx)("option",{value:"priceLowToHigh",children:"Price Low To High"})]}),(0,l.jsx)(d.p,{size:12,className:"absolute top-1/2 -translate-y-1/2 md:right-4 right-2"})]})]})]}),(0,l.jsxs)("div",{className:"list-filtered flex items-center gap-3 mt-4",children:[(0,l.jsxs)("div",{className:"total-product",children:[B,(0,l.jsx)("span",{className:"text-secondary pl-1",children:"Products Found"})]}),(y||k||S||z)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"list flex items-center gap-3",children:[(0,l.jsx)("div",{className:"w-px h-4 bg-line"}),y&&(0,l.jsxs)("div",{className:"item flex items-center px-2 py-1 gap-1 bg-linear rounded-full capitalize",onClick:()=>{w(null)},children:[(0,l.jsx)(m.X,{className:"cursor-pointer"}),(0,l.jsx)("span",{children:y})]}),k&&(0,l.jsxs)("div",{className:"item flex items-center px-2 py-1 gap-1 bg-linear rounded-full capitalize",onClick:()=>{C(null)},children:[(0,l.jsx)(m.X,{className:"cursor-pointer"}),(0,l.jsx)("span",{children:k})]}),S&&(0,l.jsxs)("div",{className:"item flex items-center px-2 py-1 gap-1 bg-linear rounded-full capitalize",onClick:()=>{P(null)},children:[(0,l.jsx)(m.X,{className:"cursor-pointer"}),(0,l.jsx)("span",{children:S})]}),z&&(0,l.jsxs)("div",{className:"item flex items-center px-2 py-1 gap-1 bg-linear rounded-full capitalize",onClick:()=>{L(null)},children:[(0,l.jsx)(m.X,{className:"cursor-pointer"}),(0,l.jsx)("span",{children:z})]})]}),(0,l.jsxs)("div",{className:"clear-btn flex items-center px-2 py-1 gap-1 rounded-full border border-red cursor-pointer",onClick:()=>{N(""),w(null),C(null),P(null),L(null),T({min:0,max:100}),F(0),w(r=null)},children:[(0,l.jsx)(m.X,{color:"rgb(219, 68, 68)",className:"cursor-pointer"}),(0,l.jsx)("span",{className:"text-button-uppercase text-red",children:"Clear All"})]})]})]}),(0,l.jsx)("div",{className:"list-product hide-product-sold grid lg:grid-cols-".concat(u," sm:grid-cols-3 grid-cols-2 sm:gap-[30px] gap-[20px] mt-7"),children:s.map(e=>"no-data"===e.id?(0,l.jsx)("div",{className:"no-data-product",children:"No products match the selected criteria."},e.id):Q.includes(e.type)?(0,l.jsx)(p.Z,{data:e,type:"grid"},e.id):null)}),O>1&&(0,l.jsx)("div",{className:"list-pagination flex items-center justify-center md:mt-10 mt-7",children:(0,l.jsx)(x.Z,{pageCount:O,onPageChange:e=>{F(e)}})})]})})})]})}}},function(e){e.O(0,[791,749,237,55,963,971,472,744],function(){return e(e.s=5492)}),_N_E=e.O()}]);