"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../tslib.es6-C4EgNkz1.js"),n=require("react"),i=require("../utils-C9NL3q0j.js"),g=require("../button-xYFMCdP0.js"),s=require("../menu-button-IlgSfSj5.js"),x=require("../menu-D1yitU4y.js");require("classnames");const q=a=>{var{a11yMenuText:l,children:o,type:u,bodyState:t,a11yButtonLoadingText:y,onCollapse:d,onExpand:p,onSelect:c=()=>{},onChange:b=()=>{}}=a,e=S.__rest(a,["a11yMenuText","children","type","bodyState","a11yButtonLoadingText","onCollapse","onExpand","onSelect","onChange"]);const r=[x.EbayMenuItem,s.EbayMenuButtonSeparator],m=i.filterBy(o,B=>!r.includes(B.type)),E=i.filterByType(o,r);return n.createElement("span",{className:"split-button"},n.createElement(g.EbayButton,Object.assign({"aria-label":t==="loading"?y:void 0},e,{ref:void 0,split:"start",bodyState:t==="expand"?void 0:t}),m),n.createElement(s.EbayMenuButton,{priority:e.priority,disabled:e.disabled,transparent:e.transparent,partiallyDisabled:e.partiallyDisabled,size:e.size,type:u,split:"end",reverse:!0,a11yText:l,onCollapse:d,onExpand:p,onSelect:c,onChange:b},E))};exports.EbaySplitButton=q;
