import BaseStyle from 'primevue/base/style';

var theme = function theme(_ref) {
  var dt = _ref.dt;
  return "\n.p-tree {\n    background: ".concat(dt('tree.background'), ";\n    color: ").concat(dt('tree.color'), ";\n    border-radius: ").concat(dt('rounded.base'), ";\n    border: 0 none;\n    padding: 1rem;\n}\n\n.p-tree-root-children {\n    margin: 0;\n    padding: 0;\n    list-style-type: none;\n    overflow: auto;\n}\n\n.p-tree-node {\n    padding: 0 0;\n    outline: 0 none;\n    margin: 2px 0;\n}\n\n.p-tree-root-children > .p-tree-node:first-child {\n    margin-top: 0;\n}\n\n.p-tree-root-children > .p-tree-node:last-child {\n    margin-bottom: 0;\n}\n\n.p-tree-node-content {\n    border-radius: ").concat(dt('rounded.base'), ";\n    padding: 0.25rem 0.5rem;\n    display: flex;\n    align-items: center;\n    outline-color: transparent;\n    color: ").concat(dt('tree.node.color'), ";\n    transition: background-color ").concat(dt('transition.duration'), ", color ").concat(dt('transition.duration'), ", outline-color ").concat(dt('transition.duration'), ";\n}\n\n.p-tree-node:focus-visible > .p-tree-node-content {\n    outline: 1px solid ").concat(dt('focus.ring.color'), ";\n    outline-offset: -2px;\n}\n\n.p-tree-node-content.p-tree-node-selected {\n    background: ").concat(dt('highlight.background'), ";\n    color: ").concat(dt('highlight.color'), ";\n}\n\n.p-tree-node-toggle-button {\n    cursor: pointer;\n    user-select: none;\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    overflow: hidden;\n    position: relative;\n    flex-shrink: 0;\n    margin: 0 0.5rem 0 0;\n    width: 1.75rem;\n    height: 1.75rem;\n    color: ").concat(dt('tree.toggle.color'), ";\n    border: 0 none;\n    background: transparent;\n    border-radius: 50%;\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    outline-color: transparent;\n    padding: 0;\n}\n\n.p-tree-node-toggle-button:enabled:hover {\n    background: ").concat(dt('tree.toggle.hover.background'), ";\n    color: ").concat(dt('tree.toggle.hover.color'), ";\n}\n\n.p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-button,\n.p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-icon {\n    color: inherit;\n}\n\n.p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-button:hover {\n    background: ").concat(dt('tree.toggle.highlight.hover.background'), ";\n}\n\n.p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover {\n    background: ").concat(dt('tree.node.hover.background'), ";\n    color: ").concat(dt('tree.node.hover.color'), ";\n}\n\n.p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover .p-tree-node-toggle-button {\n    color: ").concat(dt('tree.toggle.hover.color'), ";\n}\n\n.p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover .p-tree-node-icon {\n    color: ").concat(dt('tree.icon.hover.color'), ";\n}\n\n.p-tree-node-children {\n    margin: 0;\n    padding: 0;\n    list-style-type: none;\n    padding: 0 0 0 1rem;\n}\n\n.p-tree-root {\n    overflow: auto;\n}\n\n.p-tree-node-selectable {\n    cursor: pointer;\n    user-select: none;\n}\n\n.p-tree-node-leaf > .p-tree-node-content .p-tree-node-toggle-button {\n    visibility: hidden;\n}\n\n.p-tree-node-icon {\n    margin-right: 0.5rem;\n    color: ").concat(dt('tree.icon.color'), ";\n    transition: color ").concat(dt('transition.duration'), ";\n}\n\n.p-tree-node-content .p-checkbox {\n    margin-right: 0.5rem;\n}\n\n.p-tree-filter-input {\n    width: 100%;\n    padding-right: 1.75rem;\n}\n\n.p-tree-filter-container {\n    position: relative;\n    display: block;\n    width: 100%;\n    margin-bottom: 0.5rem;\n}\n\n.p-tree-filter-icon {\n    position: absolute;\n    top: 50%;\n    margin-top: -0.5rem;\n    right: 0.75rem;\n    color: ").concat(dt('tree.filter.icon.color'), ";\n}\n\n.p-tree-loading {\n    position: relative;\n    min-height: 4rem;\n}\n\n.p-tree-loading-icon {\n    font-size: 2rem;\n    width: 2rem;\n    height: 2rem;\n}\n\n.p-tree-mask {\n    position: absolute;\n    z-index: 1;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n}\n\n.p-tree-flex-scrollable {\n    display: flex;\n    flex: 1;\n    height: 100%;\n    flex-direction: column;\n}\n\n.p-tree-flex-scrollable .p-tree-root {\n    flex: 1;\n}\n");
};
var classes = {
  root: function root(_ref2) {
    var props = _ref2.props;
    return ['p-tree p-component', {
      'p-tree-selectable': props.selectionMode != null,
      'p-tree-loading': props.loading,
      'p-tree-flex-scrollable': props.scrollHeight === 'flex'
    }];
  },
  loadingOverlay: 'p-tree-mask p-component-overlay',
  loadingIcon: 'p-tree-loading-icon',
  filterContainer: 'p-tree-filter-container',
  input: 'p-tree-filter-input',
  searchIcon: 'p-tree-filter-icon',
  wrapper: 'p-tree-root',
  container: 'p-tree-root-children',
  node: function node(_ref3) {
    var instance = _ref3.instance;
    return ['p-tree-node', {
      'p-tree-node-leaf': instance.leaf
    }];
  },
  content: function content(_ref4) {
    var instance = _ref4.instance;
    return ['p-tree-node-content', instance.node.styleClass, {
      'p-tree-node-selectable': instance.selectable,
      'p-tree-node-selected': instance.checkboxMode && instance.$parentInstance.highlightOnSelect ? instance.checked : instance.selected
    }];
  },
  toggler: 'p-tree-node-toggle-button',
  togglerIcon: 'p-tree-node-toggle-icon',
  nodeTogglerIcon: 'p-tree-node-toggler-icon',
  //todo: discuss
  nodeCheckbox: 'p-tree-node-checkbox',
  nodeIcon: 'p-tree-node-icon',
  label: 'p-tree-node-label',
  subgroup: 'p-tree-node-children'
};
var TreeStyle = BaseStyle.extend({
  name: 'tree',
  theme: theme,
  classes: classes
});

export { TreeStyle as default };
