(()=>{var e={};e.id=7082,e.ids=[7082],e.modules={72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},82297:(e,r,t)=>{"use strict";t.r(r),t.d(r,{GlobalError:()=>l.a,__next_app__:()=>p,originalPathname:()=>u,pages:()=>d,routeModule:()=>h,tree:()=>o}),t(20710),t(88242),t(35866);var s=t(23191),a=t(88716),i=t(37922),l=t.n(i),n=t(95231),c={};for(let e in n)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(c[e]=()=>n[e]);t.d(r,c);let o=["",{children:["merch",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(t.bind(t,20710)),"/root/ShiftedOffRoad/app/merch/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(t.bind(t,88242)),"/root/ShiftedOffRoad/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(t.t.bind(t,35866,23)),"next/dist/client/components/not-found-error"]}],d=["/root/ShiftedOffRoad/app/merch/page.tsx"],u="/merch/page",p={require:t,loadChunk:()=>Promise.resolve()},h=new s.AppPageRouteModule({definition:{kind:a.x.APP_PAGE,page:"/merch/page",pathname:"/merch",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:o}})},67302:(e,r,t)=>{Promise.resolve().then(t.bind(t,54878))},54878:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>o});var s=t(10326),a=t(17577),i=t(86293),l=t(19640),n=t(90725),c=t(1691);function o(){let[e,r]=(0,a.useState)([]),[t,o]=(0,a.useState)(!1),[d,u]=(0,a.useState)("");return(0,s.jsxs)("main",{children:[s.jsx(i.default,{}),s.jsx(l.default,{}),s.jsx("section",{className:"section",children:(0,s.jsxs)("div",{className:"container layout-2col",children:[s.jsx("aside",{children:s.jsx(c.default,{title:"Filter Merch"})}),(0,s.jsxs)("div",{children:[s.jsx("h1",{className:"page-title",children:"Merch"}),d?s.jsx("div",{className:"connect-message",children:d}):null,(0,s.jsxs)("div",{className:"products",children:[e.map(e=>s.jsx("div",{className:"prod",children:(0,s.jsxs)("div",{className:"prod__link",children:[e.thumbnailUrl?s.jsx("img",{src:e.thumbnailUrl,alt:e.name,className:"prod__img"}):s.jsx("div",{className:"prod__img prod__img--empty"}),(0,s.jsxs)("div",{className:"prod__body",children:[s.jsx("div",{className:"prod__title",children:e.name}),s.jsx("div",{className:"prod__price",children:e.unitAmount&&e.currency?`${(e.unitAmount/100).toFixed(2)} ${e.currency.toUpperCase()}`:"Price unavailable"})]})]})},e.id)),e.length||t?null:s.jsx("div",{className:"storefront-muted",children:"No merch yet."})]})]})]})}),s.jsx(n.Z,{})]})}},1691:(e,r,t)=>{"use strict";t.d(r,{default:()=>l});var s=t(10326),a=t(17577);let i={priceMin:"",priceMax:"",brand:"",stockOnly:!1,sort:"popular"};function l({title:e="Filter",onApply:r}){let[t,l]=(0,a.useState)(i),[n,c]=(0,a.useState)(null),o=(0,a.useMemo)(()=>{if(!n)return"No filters applied.";let e=[];return n.priceMin&&e.push(`Min $${n.priceMin}`),n.priceMax&&e.push(`Max $${n.priceMax}`),n.brand&&e.push(n.brand),n.stockOnly&&e.push("In stock"),n.sort&&e.push(`Sort: ${n.sort}`),e.length?e.join(" • "):"No filters applied."},[n]);return(0,s.jsxs)("div",{className:"card filter-card",children:[s.jsx("div",{className:"filter-card__title",children:e}),(0,s.jsxs)("div",{className:"filter-card__group",children:[s.jsx("label",{className:"filter-card__label",children:"Price"}),(0,s.jsxs)("div",{className:"filter-card__row",children:[s.jsx("input",{className:"filter-card__input",placeholder:"Min",value:t.priceMin,onChange:e=>l({...t,priceMin:e.target.value}),inputMode:"numeric"}),s.jsx("input",{className:"filter-card__input",placeholder:"Max",value:t.priceMax,onChange:e=>l({...t,priceMax:e.target.value}),inputMode:"numeric"})]})]}),(0,s.jsxs)("div",{className:"filter-card__group",children:[s.jsx("label",{className:"filter-card__label",children:"Brand"}),(0,s.jsxs)("select",{className:"filter-card__select",value:t.brand,onChange:e=>l({...t,brand:e.target.value}),children:[s.jsx("option",{value:"",children:"All brands"}),s.jsx("option",{value:"TrailForge",children:"TrailForge"}),s.jsx("option",{value:"RidgeLine",children:"RidgeLine"}),s.jsx("option",{value:"SummitWorks",children:"SummitWorks"}),s.jsx("option",{value:"IronPeak",children:"IronPeak"})]})]}),(0,s.jsxs)("div",{className:"filter-card__group",children:[s.jsx("label",{className:"filter-card__label",children:"Sort"}),(0,s.jsxs)("select",{className:"filter-card__select",value:t.sort,onChange:e=>l({...t,sort:e.target.value}),children:[s.jsx("option",{value:"popular",children:"Most popular"}),s.jsx("option",{value:"new",children:"Newest"}),s.jsx("option",{value:"priceLow",children:"Price: Low to High"}),s.jsx("option",{value:"priceHigh",children:"Price: High to Low"})]})]}),(0,s.jsxs)("div",{className:"filter-card__toggle",children:[s.jsx("input",{id:"stockOnly",type:"checkbox",checked:t.stockOnly,onChange:e=>l({...t,stockOnly:e.target.checked})}),s.jsx("label",{htmlFor:"stockOnly",children:"In-stock only"})]}),(0,s.jsxs)("div",{className:"filter-card__actions",children:[s.jsx("button",{className:"btn",type:"button",onClick:function(){c(t),r?.(t)},children:"Apply"}),s.jsx("button",{className:"btn btn--ghost",type:"button",onClick:function(){l(i),c(null),r?.(i)},children:"Reset"})]}),s.jsx("div",{className:"filter-card__summary",children:o})]})}},20710:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>s});let s=(0,t(68570).createProxy)(String.raw`/root/ShiftedOffRoad/app/merch/page.tsx#default`)}};var r=require("../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[9276,1159,9404,6056],()=>t(82297));module.exports=s})();