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