"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.InputSelect = void 0;
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _react = _interopRequireDefault(require("react"));
var _Styles = require("./Styles");
var _Icons = require("../Icons");
var _Select = require("../Select");
var _Styles2 = require("../Trigger/Styles");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var InputSelect = exports.InputSelect = function InputSelect(_ref) {
  var onChange = _ref.onChange,
    size = _ref.size,
    selected = _ref.selected,
    options = _ref.options,
    _ref$search = _ref.search,
    search = _ref$search === void 0 ? false : _ref$search,
    _ref$disabled = _ref.disabled,
    disabled = _ref$disabled === void 0 ? false : _ref$disabled,
    _ref$disabledInternal = _ref.disabledInternalSort,
    disabledInternalSort = _ref$disabledInternal === void 0 ? true : _ref$disabledInternal,
    _ref$keepSameOptionsO = _ref.keepSameOptionsOrder,
    keepSameOptionsOrder = _ref$keepSameOptionsO === void 0 ? true : _ref$keepSameOptionsO,
    selectedLabel = _ref.selectedLabel,
    renderOption = _ref.renderOption;
  return /*#__PURE__*/_react.default.createElement(_Select.Select, {
    onChange: onChange,
    forceCloseMenu: true,
    disableSearch: !search,
    target: /*#__PURE__*/_react.default.createElement(_StyledStyledButton, null, /*#__PURE__*/_react.default.createElement(_Styles.StyledInputSelectTrigger, {
      $disabled: disabled,
      $size: size
    }, selectedLabel ? selectedLabel : selected, size === "big" ? /*#__PURE__*/_react.default.createElement(_Icons.ArrowDownIcon, {
      fill: "var(--color-theme-700)"
    }) : /*#__PURE__*/_react.default.createElement(_Icons.ArrowDownSmallIcon, {
      fill: "var(--color-theme-700)"
    }))),
    options: options,
    disabledInternalSort: disabledInternalSort,
    keepSameOptionsOrder: keepSameOptionsOrder,
    selected: selected,
    renderOption: renderOption
  });
};
var _StyledStyledButton = (0, _styledComponents.default)(_Styles2.StyledButton).withConfig({
  displayName: "InputSelect___StyledStyledButton",
  componentId: "sc-1lmb5y-0"
})(["flex-shrink:0"]);
//# sourceMappingURL=InputSelect.js.map