!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};return(()=>{o.r(n),o.d(n,{default:()=>p});var e=o(3838),t=o.n(e),r=o(6689),a=o.n(r),l=o(1929),s=o.n(l);const i=["options","actionLabel","placeholder"];class p extends a().Component{constructor(e){super(e),this.state={value:e.value||null},this.handleChange=this.handleChange.bind(this),this.handleClick=this.handleClick.bind(this)}handleChange(e){this.setState({value:e})}handleClick(e){e.preventDefault(),this.props.onClick(this.state.value.value)}render(){let e=this.props,{options:o,actionLabel:n,placeholder:r}=e,{value:l}=(t()(e,i),this.state),p=this.props.hasOwnProperty("small")?"small":"",u=this.props.hasOwnProperty("small")?"btn-group-sm":"normal",c=l instanceof Object||null==l?l:o.find((e=>e.value==l));return a().createElement("div",{className:"action-dropdown btn-group "+u},a().createElement(s(),{value:c,onChange:this.handleChange,options:o,placeholder:r,className:"btn-group action-select text-left"+p,isClearable:!1}),a().createElement("button",{type:"button",className:"btn btn-default action-button",onClick:this.handleClick},n))}}})(),n})()));
//# sourceMappingURL=action-dropdown.js.map