1import{j as e,r as d,f,u,d as g,e as x,a as j,b as p,g as h,R as w,S as b,h as N}from"./index-a9a69441.js";import{I as v}from"./index.es-06b930de.js";const S="_featured_s7wr3_38",y="_arrow_s7wr3_60",k="_first_s7wr3_78",F="_second_s7wr3_82",$="_discount_s7wr3_137",C="_banner_s7wr3_147",t={"size-select":"_size-select_s7wr3_1","li-padding":"_li-padding_s7wr3_25","li-padding-p":"_li-padding-p_s7wr3_29","active-select":"_active-select_s7wr3_33",featured:S,"featured-hero":"_featured-hero_s7wr3_42","feature-img":"_feature-img_s7wr3_46",arrow:y,first:k,second:F,"featured-product":"_featured-product_s7wr3_87","feature-list":"_feature-list_s7wr3_95","featured-sub":"_featured-sub_s7wr3_102","featured-details":"_featured-details_s7wr3_118","featured-top":"_featured-top_s7wr3_122","featured-price":"_featured-price_s7wr3_131",discount:$,"featured-type":"_featured-type_s7wr3_141",banner:C,"banner-list":"_banner-list_s7wr3_154","banner-sub":"_banner-sub_s7wr3_161"},I="/assets/sneakerHero-810284a2.jpeg",z=()=>e.jsx("section",{className:t["featured-hero"],children:e.jsx("img",{src:I,alt:"featured-hero"})}),E=()=>{const[s,a]=d.useState([...f,f[0]]),l=u(),i=c=>{if(c==="right"){const r=s[1];s.push(r),a([r,...s.slice(2)])}else{const r=s[1];s.push(r),a([r,...s.slice(2)])}};return e.jsxs("div",{className:t["feature-img"],children:[s.map((c,r)=>e.jsx("div",{onClick:o=>{o.stopPropagation(),l(`${c.type}/${c.category}`)},children:e.jsx("img",{src:c.image,alt:c.name})},r)),e.jsxs("div",{className:t.arrow,children:[e.jsx("button",{className:t.first,onClick:()=>i("left"),children:e.jsx(g,{cursor:"pointer",size:22})}),e.jsx("button",{className:t.second,onClick:()=>i("right"),children:e.jsx(x,{cursor:"pointer",size:22})})]})]})},P=({product:s})=>{const a=u();return e.jsxs("div",{className:t["featured-sub"],onClick:()=>a(`/product/${s.slug}`),children:[e.jsx("img",{src:s.heroImage,alt:s.name}
1),e.jsxs("div",{className:t["featured-details"],children:[e.jsxs("div",{className:t["featured-top"],children:[e.jsx("h2",{children:s.name}),e.jsxs("div",{className:t["featured-price"],children:[e.jsxs("p",{className:s.discount>0?t.discount:t.noDiscount,children:["$",s.amount]}),s.discount>0&&e.jsxs("span",{children:["$",s.amount-s.discount/100*s.amount]})]})]}),e.jsxs("p",{className:t["featured-type"],children:[s.productType,"'s ",s.category]})]})]})},R=()=>{const{handleSetNotification:s}=j(),[a,l]=d.useState([]),[i,c]=d.useState(1),[r,o]=d.useState(0),_=10;p(["featured-main"],async()=>await h(`/product/featured/all/${i}/${_}`),{onSuccess:n=>{l(n.data),o(n.total)},onError:n=>{s({message:n.data.message,status:"error"})},enabled:(a==null?void 0:a.length)<=1});const m=async()=>{const n=await h(`/product/featured/all/${i}/${_}`);l(a.concat(n.data)),o(r)};return d.useEffect(()=>{i>1&&m()},[i]),e.jsx(w.Fragment,{children:a.length>0&&e.jsxs("section",{className:t["featured-product"],children:[e.jsx("h2",{children:"Shop Nike Featured"}),e.jsx(v,{dataLength:a.length+1,next:()=>c(i+1),hasMore:a.length!==r,loader:a.length>1&&e.jsx("div",{className:"globalCenter",children:e.jsx(b,{})}),endMessage:e.jsx("p",{}),height:800,children:e.jsx("div",{className:t["feature-list"],children:a.map(n=>e.jsx(P,{product:n},n._id))})})]})})},T=()=>{const s=u();return e.jsxs("div",{className:t.banner,children:[e.jsx("h2",{children:"The Essentials"}),e.jsx("div",{className:t["banner-list"],children:N.map(a=>e.jsxs("div",{onClick:()=>s(a.link),className:t["banner-sub"],children:[e.jsx("img",{src:a.image,alt:"nike"}),e.jsx("p",{children:a.name})]},a.id))})]})},B=()=>e.jsxs("div",{className:t.featured,children:[e.jsx(z,{}),e.jsx(E,{}),e.jsx(R,{}),e.jsx(T,{})]}),M=()=>e.jsx(B,{});export{M as default};
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.