'use client';
import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useCollection as r}from"@gem-sdk/core";import{createClass as t,createStyle as o,If as s}from"@gem-sdk/system";import{getClassContainer as m,getClassToolbarWrapper as a,getClassToolbarSortWrapper as i,getClassSelect as c,getClassToolbarWrapperQuantity as n}from"./common/classes.js";import{getStyleCollectionToolbar as d,getStyleToolbarWrapper as p,getStyleSelect as u,getStyleToolbarWrapperQuantity as f}from"./common/styles.js";import{sortBy as h,SORT_OPTIONS as v,getSortingTextDisplayVal as g,getQuantityTextDisplayVal as y}from"./common/helpers.js";let N=({setting:N,builderProps:j,pageContext:x})=>{let{displayQuantity:b}=N??{},k=r(),C=k?.products?.totalCount??12,S=t({...m()}),T=t({...a()}),V=t({...i()}),$=t({...c(N)}),q=t({...n(N)}),w=t({"gp-flex-1":!0}),z=o({...d(N)}),A=o({...p(N)}),B=o({...u(N)}),D=o({...f(N)}),E=g({setting:N,builderProps:j,pageContext:x},"react"),F=y({setting:N,builderProps:j,pageContext:x},"react");return e("div",{className:S,style:z,id:j?.uid,children:l("div",{className:T,style:A,children:[e("div",{className:V,children:l("select",{id:"sorting",className:$,style:B,defaultValue:h,children:[e("option",{value:"",children:E},E?.toString()),v.map(l=>e("option",{value:l.value,children:l.name},l.value))]})}),e("div",{className:q,style:D,children:s(b,(F?.toString()??"").replace("%number%",`${C}`),"")}),e("div",{className:w,children:"\xa0"})]})})};export{N as default};
