import BaseStyle from 'primevue/base/style';

var inlineStyles = {
  root: function root(_ref) {
    var props = _ref.props;
    return {
      position: props.appendTo === 'self' ? 'relative' : undefined
    };
  }
};
var classes = {
  root: function root(_ref2) {
    var instance = _ref2.instance,
      props = _ref2.props;
    return ['p-cascadeselect 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': instance.focused,
      'p-inputwrapper-filled': props.modelValue,
      'p-inputwrapper-focus': instance.focused || instance.overlayVisible,
      'p-overlay-open': instance.overlayVisible
    }];
  },
  label: function label(_ref3) {
    var instance = _ref3.instance,
      props = _ref3.props;
    var alignClass = props.align === '' ? null : 'text-' + props.align;
    return ['p-cascadeselect-label p-inputtext', {
      alignClass: alignClass,
      'p-placeholder': instance.label === props.placeholder,
      'p-cascadeselect-label-empty': !instance.$slots['value'] && (instance.label === 'p-emptylabel' || instance.label.length === 0)
    }];
  },
  dropdownButton: 'p-cascadeselect-trigger',
  loadingIcon: 'p-cascadeselect-trigger-icon',
  dropdownIcon: 'p-cascadeselect-trigger-icon',
  panel: function panel(_ref4) {
    _ref4.props;
      var instance = _ref4.instance;
    return ['p-cascadeselect-panel p-component', {
      'p-ripple-disabled': instance.$primevue.config.ripple === false
    }];
  },
  wrapper: 'p-cascadeselect-items-wrapper',
  list: 'p-cascadeselect-panel p-cascadeselect-items',
  item: function item(_ref5) {
    var instance = _ref5.instance,
      processedOption = _ref5.processedOption;
    return ['p-cascadeselect-item', {
      'p-cascadeselect-item-group': instance.isOptionGroup(processedOption),
      'p-cascadeselect-item-active p-highlight': instance.isOptionActive(processedOption),
      'p-focus': instance.isOptionFocused(processedOption),
      'p-disabled': instance.isOptionDisabled(processedOption)
    }];
  },
  content: 'p-cascadeselect-item-content',
  text: 'p-cascadeselect-item-text',
  groupIcon: 'p-cascadeselect-group-icon',
  sublist: 'p-cascadeselect-sublist'
};
var CascadeSelectStyle = BaseStyle.extend({
  name: 'cascadeselect',
  classes: classes,
  inlineStyles: inlineStyles
});

export { CascadeSelectStyle as default };
