'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-organizationchart-table {\n    border-spacing: 0;\n    border-collapse: separate;\n    margin: 0 auto;\n}\n\n.p-organizationchart-table > tbody > tr > td {\n    text-align: center;\n    vertical-align: top;\n    padding: 0 0.75rem;\n}\n\n.p-organizationchart-node {\n    display: inline-block;\n    position: relative;\n    border: 1px solid ".concat(dt('organizationchart.node.border.color'), ";\n    background: ").concat(dt('organizationchart.node.background'), ";\n    color: ").concat(dt('organizationchart.node.color'), ";\n    padding: 0.75rem 1rem;\n    border-radius: ").concat(dt('rounded.base'), ";\n    transition: background-color ").concat(dt('transition.duration'), ", color ").concat(dt('transition.duration'), ";\n}\n\n.p-organizationchart-node:has(.p-organizationchart-node-toggle-button) {\n    padding: 0.75rem 1rem 1.25rem 1rem;\n}\n\n.p-organizationchart-node.p-organizationchart-node-selectable:not(.p-highlight):hover {\n    background: ").concat(dt('organizationchart.node.hover.background'), ";\n    color: ").concat(dt('organizationchart.node.hover.color'), ";\n}\n\n.p-organizationchart-node.p-highlight {\n    background: ").concat(dt('highlight.background'), ";\n    color: ").concat(dt('highlight.color'), ";\n}\n\n.p-organizationchart-node-toggle-button {\n    position: absolute;\n    bottom: -0.75rem;\n    margin-left: -0.75rem;\n    z-index: 2;\n    left: 50%;\n    user-select: none;\n    cursor: pointer;\n    width: 1.5rem;\n    height: 1.5rem;\n    text-decoration: none;\n    background: ").concat(dt('organizationchart.toggle.icon.background'), ";\n    color: ").concat(dt('organizationchart.toggle.icon.color'), ";\n    border-radius: 50%;\n    border: 1px solid ").concat(dt('organizationchart.toggle.icon.border.color'), ";\n    display: inline-flex;\n    justify-content: center;\n    align-items: center;\n    outline-color: transparent;\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}\n\n.p-organizationchart-node-toggle-button:focus-visible {\n    outline: ").concat(dt('focus.ring.width'), " ").concat(dt('focus.ring.style'), " ").concat(dt('focus.ring.color'), ";\n    outline-offset: ").concat(dt('focus.ring.offset'), ";\n}\n\n.p-organizationchart-node-toggle-button-icon {\n    position: relative;\n    top: 1px;\n}\n\n.p-organizationchart-connector-down {\n    margin: 0 auto;\n    height: 20px;\n    width: 1px;\n    background: ").concat(dt('organizationchart.connector.color'), ";\n}\n\n.p-organizationchart-connector-right {\n    border-radius: 0;\n    border-left: 1px solid ").concat(dt('organizationchart.connector.color'), ";\n    border-top-left-radius: ").concat(dt('rounded.base'), ";\n}\n\n.p-organizationchart-connector-left {\n    border-radius: 0;\n    border-right: 1px solid ").concat(dt('organizationchart.connector.color'), ";\n}\n\n.p-organizationchart-connector-top {\n    border-top: 1px solid ").concat(dt('organizationchart.connector.color'), ";\n}\n\n.p-organizationchart-node-selectable {\n    cursor: pointer;\n}\n\n.p-organizationchart-connectors :nth-child(1 of .p-organizationchart-connector-left) {\n    border-right: 0 none;\n}\n\n.p-organizationchart-connectors :nth-last-child(1 of .p-organizationchart-connector-left) {\n    border-top-right-radius: ").concat(dt('rounded.base'), ";\n}\n\n.p-organizationchart-connectors :nth-child(1 of .p-organizationchart-connector-right) {\n    border-left: 1px solid ").concat(dt('organizationchart.connector.color'), ";\n    border-top-left-radius: ").concat(dt('rounded.base'), ";\n}\n");
};
var classes = {
  root: 'p-organizationchart p-component',
  table: 'p-organizationchart-table',
  node: function node(_ref2) {
    var instance = _ref2.instance;
    return ['p-organizationchart-node', {
      'p-organizationchart-node-selectable': instance.selectable,
      'p-highlight': instance.selected
    }];
  },
  nodeToggleButton: 'p-organizationchart-node-toggle-button',
  nodeToggleButtonIcon: 'p-organizationchart-node-toggle-button-icon',
  connectors: 'p-organizationchart-connectors',
  connectorDown: 'p-organizationchart-connector-down',
  connectorLeft: function connectorLeft(_ref3) {
    var index = _ref3.index;
    return ['p-organizationchart-connector-left', {
      'p-organizationchart-connector-top': !(index === 0)
    }];
  },
  connectorRight: function connectorRight(_ref4) {
    var props = _ref4.props,
      index = _ref4.index;
    return ['p-organizationchart-connector-right', {
      'p-organizationchart-connector-top': !(index === props.node.children.length - 1)
    }];
  },
  nodeChildren: 'p-organizationchart-node-children'
};
var OrganizationChartStyle = BaseStyle__default["default"].extend({
  name: 'organizationchart',
  theme: theme,
  classes: classes
});

module.exports = OrganizationChartStyle;
