'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var ChevronDown = require('../../../../icons/ChevronDown.js');
var ChevronUp = require('../../../../icons/ChevronUp.js');
var styles$2 = require('../../../Field/dropdown/styles.js');
var styles$1 = require('../../../Field/styles.js');
var styles = require('./styles.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

function DatePickerSelect({ hasError, disabled, handleClick, placeholder, visible, leadingIcon, }) {
    return (React__default['default'].createElement(styles.Wrapper, null,
        React__default['default'].createElement(styles$1.Border, { hasError: hasError, disabled: disabled },
            React__default['default'].createElement(styles$2.SelectInput, { role: "button", "aria-haspopup": "true", onClick: handleClick, variant: "medium", disabled: disabled, hasText: true },
                leadingIcon && (React__default['default'].createElement(styles.LeadingIconWrapper, { disabled: disabled }, leadingIcon)),
                placeholder,
                React__default['default'].createElement("input", { name: "date-picker-select-input", "aria-autocomplete": "none" }),
                React__default['default'].createElement(styles.IconWrapper, { disabled: disabled }, visible ? React__default['default'].createElement(ChevronUp['default'], null) : React__default['default'].createElement(ChevronDown['default'], null))))));
}

exports.DatePickerSelect = DatePickerSelect;
