'use strict';

var BaseStyle = require('primevue/base/style');

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

var BaseStyle__default = /*#__PURE__*/_interopDefaultLegacy(BaseStyle);

var theme = function theme(_ref) {
  var dt = _ref.dt;
  return "\n.p-select {\n    display: inline-flex;\n    cursor: pointer;\n    position: relative;\n    user-select: none;\n    background: ".concat(dt('select.background'), ";\n    border: 1px solid ").concat(dt('select.border.color'), ";\n    transition: background-color ").concat(dt('transition.duration'), ", color ").concat(dt('transition.duration'), ", border-color ").concat(dt('transition.duration'), ", outline-color ").concat(dt('transition.duration'), ";\n    border-radius: ").concat(dt('rounded.base'), ";\n    outline-color: transparent;\n    box-shadow: ").concat(dt('select.box.shadow'), ";\n}\n\n.p-select:not(.p-disabled):hover {\n    border-color: ").concat(dt('select.hover.border.color'), ";\n}\n\n.p-select:not(.p-disabled).p-focus {\n    border-color:").concat(dt('select.focus.border.color'), ";\n    outline: 0 none;\n}\n\n.p-select.p-variant-filled {\n    background: ").concat(dt('select.filled.background'), ";\n}\n\n.p-select.p-variant-filled.p-focus {\n    background: ").concat(dt('select.filled.focus.background'), ";\n}\n\n.p-select.p-invalid {\n    border-color: ").concat(dt('select.invalid.border.color'), ";\n}\n\n.p-select.p-disabled {\n    opacity: 1;\n    background: ").concat(dt('select.disabled.background'), ";\n}\n\n.p-select-clear-icon {\n    position: absolute;\n    top: 50%;\n    margin-top: -0.5rem;\n    color: #94a3b8;\n    right: 2.5rem;\n}\n\n.p-select-dropdown {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    flex-shrink: 0;\n    background: transparent;\n    color: ").concat(dt('select.toggle.color'), ";\n    width: 2.5rem;\n    border-top-right-radius: ").concat(dt('rounded.base'), ";\n    border-bottom-right-radius: ").concat(dt('rounded.base'), ";\n}\n\n.p-select-label {\n    display: block;\n    white-space: nowrap;\n    overflow: hidden;\n    flex: 1 1 auto;\n    width: 1%;\n    padding: 0.5rem 0.75rem;\n    text-overflow: ellipsis;\n    cursor: pointer;\n    color: ").concat(dt('select.color'), ";\n    background: transparent;\n    border: 0 none;\n    outline: 0 none;\n}\n\n.p-select-label.p-placeholder {\n    color: ").concat(dt('select.placeholder.color'), ";\n}\n\n.p-select:has(.p-select-clear-icon) .p-select-label {\n    padding-right: 1.75rem;\n}\n\n.p-select.p-disabled .p-select-label {\n    color: ").concat(dt('select.disabled.color'), ";\n}\n\n.p-select-label-empty {\n    overflow: hidden;\n    opacity: 0;\n}\n\ninput.p-select-label {\n    cursor: default;\n}\n\n.p-select .p-select-overlay {\n    min-width: 100%;\n}\n\n.p-select-overlay {\n    position: absolute;\n    top: 0;\n    left: 0;\n    background: ").concat(dt('select.overlay.background'), ";\n    color: ").concat(dt('select.overlay.color'), ";\n    border: 1px solid ").concat(dt('select.overlay.border.color'), ";\n    border-radius: ").concat(dt('rounded.base'), ";\n    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);\n}\n\n.p-select-header {\n    padding: 0.5rem 0.5rem 0 0.5rem;\n}\n\n.p-select-filter {\n    width: 100%;\n    padding-right: 1.75rem;\n    margin-right: -1.75rem;\n}\n\n.p-select-filter-container {\n    position: relative;\n}\n\n.p-select-filter-icon {\n    position: absolute;\n    top: 50%;\n    margin-top: -0.5rem;\n    right: 0.75rem;\n    color: ").concat(dt('select.filter.icon.color'), ";\n}\n\n.p-select-list-container {\n    overflow: auto;\n}\n\n.p-select-option-group {\n    cursor: auto;\n    margin: 0;\n    padding: 0.5rem 0.75rem;\n    background: ").concat(dt('select.item.group.background'), ";\n    color: ").concat(dt('select.item.group.color'), ";\n    font-weight: 600;\n}\n\n.p-select-list {\n    margin: 0;\n    padding: 0;\n    list-style-type: none;\n    padding: 0.25rem 0.25rem;\n}\n\n.p-select-option {\n    cursor: pointer;\n    font-weight: normal;\n    white-space: nowrap;\n    position: relative;\n    overflow: hidden;\n    display: flex;\n    align-items: center;\n    margin: 2px 0;\n    padding: 0.5rem 0.75rem;\n    border: 0 none;\n    color: ").concat(dt('select.item.color'), ";\n    background: transparent;\n    transition: background-color ").concat(dt('transition.duration'), ", color ").concat(dt('transition.duration'), ", border-color ").concat(dt('transition.duration'), ", box-shadow ").concat(dt('transition.duration'), ", outline-color ").concat(dt('transition.duration'), ";\n    border-radius: ").concat(dt('rounded.sm'), ";\n}\n\n.p-select-option:first-child {\n    margin-top: 0;\n}\n\n.p-select-option:last-child {\n    margin-bottom: 0;\n}\n\n.p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus {\n    background: ").concat(dt('select.item.focus.background'), ";\n    color: ").concat(dt('select.item.focus.color'), ";\n}\n\n.p-select-option.p-select-option-selected {\n    background: ").concat(dt('select.item.selected.background'), ";\n    color: ").concat(dt('select.item.selected.color'), ";\n}\n\n.p-select-option.p-select-option-selected.p-focus {\n    background: ").concat(dt('select.item.selected.focus.background'), ";\n    color: ").concat(dt('select.item.selected.focus.color'), ";\n}\n\n.p-select-option-check-icon {\n    position: relative;\n    margin-left: -0.375rem;\n    margin-right: 0.375rem;\n    color: ").concat(dt('select.checkmark.color'), ";\n}\n\n.p-select-empty-message {\n    padding: 0.5rem 0.75rem;\n    background: transparent;\n}\n\n.p-fluid .p-select {\n    display: flex;\n}\n\n.p-fluid .p-select .p-select-label {\n    width: 1%;\n}\n");
};
var classes = {
  root: function root(_ref2) {
    var instance = _ref2.instance,
      props = _ref2.props,
      state = _ref2.state;
    return ['p-select p-component p-inputwrapper', {
      'p-disabled': props.disabled,
      'p-invalid': props.invalid,
      'p-variant-filled': props.variant ? props.variant === 'filled' : instance.$primevue.config.inputStyle === 'filled',
      'p-focus': state.focused,
      'p-inputwrapper-filled': instance.hasSelectedOption,
      'p-inputwrapper-focus': state.focused || state.overlayVisible,
      'p-select-open': state.overlayVisible
    }];
  },
  input: function input(_ref3) {
    var instance = _ref3.instance,
      props = _ref3.props;
    return ['p-select-label', {
      'p-placeholder': !props.editable && instance.label === props.placeholder,
      'p-select-label-empty': !props.editable && !instance.$slots['value'] && (instance.label === 'p-emptylabel' || instance.label.length === 0)
    }];
  },
  clearIcon: 'p-select-clear-icon',
  trigger: 'p-select-dropdown',
  loadingicon: 'p-select-loading-icon',
  dropdownIcon: 'p-select-dropdown-icon',
  panel: function panel(_ref4) {
    var instance = _ref4.instance;
    return ['p-select-overlay p-component', {
      'p-ripple-disabled': instance.$primevue.config.ripple === false
    }];
  },
  header: 'p-select-header',
  filterContainer: 'p-select-filter-container',
  filterInput: 'p-select-filter',
  filterIcon: 'p-select-filter-icon',
  wrapper: 'p-select-list-container',
  list: 'p-select-list',
  itemGroup: 'p-select-option-group',
  itemGroupLabel: 'p-select-option-group-label',
  item: function item(_ref5) {
    var instance = _ref5.instance,
      props = _ref5.props,
      state = _ref5.state,
      option = _ref5.option,
      focusedOption = _ref5.focusedOption;
    return ['p-select-option', {
      'p-select-option-selected': instance.isSelected(option) && props.highlightOnSelect,
      'p-focus': state.focusedOptionIndex === focusedOption,
      'p-disabled': instance.isOptionDisabled(option)
    }];
  },
  itemLabel: 'p-select-option-label',
  checkIcon: 'p-select-option-check-icon',
  blankIcon: 'p-select-option-blank-icon',
  emptyMessage: 'p-select-empty-message'
};
var SelectStyle = BaseStyle__default["default"].extend({
  name: 'select',
  theme: theme,
  classes: classes
});

module.exports = SelectStyle;
