"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("../tslib.es6-C4EgNkz1.js"),h=require("classnames"),t=require("react"),k=c=>{var{defaultSelected:d,selected:a,href:e,className:i,useAriaPressed:o,a11ySelectedText:u,disabled:n,children:b,onClick:m=()=>{}}=c,S=N.__rest(c,["defaultSelected","selected","href","className","useAriaPressed","a11ySelectedText","disabled","children","onClick"]);const s=e?"filter-link":"filter-button",[f,p]=t.useState(d),l=typeof a<"u"?a:f,y=e?"a":"button",C=E=>{if(!n){const r=!l;p(r),m(E,{selected:r})}};return t.createElement(y,Object.assign({},S,{disabled:n,className:h(s,i,`${s}--${l?"selected":"unselected"}`),type:e?void 0:"button",href:e,"aria-pressed":o!==!1&&!e&&l?"true":void 0,onClick:C}),t.createElement("span",{className:`${s}__cell`},t.createElement("span",null,b),e&&l?t.createElement("span",{className:"clipped"},"- ",u||"Selected"):null))};exports.EbayFilter=k;
