import './Table.styles_a4393s.css';
import { styled } from '@linaria/react';
import { tableTokens } from './Table.tokens.js';
import { component, mergeConfig } from '../../engines/common.js';
import { checkboxConfig } from '../Checkbox/Checkbox.js';
import { linkButtonConfig } from '../LinkButton/LinkButton.js';
import { buttonConfig } from '../Button/Button.js';
import { dividerConfig } from '../Divider/Divider.js';

var mergedCheckboxConfig = /*#__PURE__*/mergeConfig(checkboxConfig);
var Checkbox = /*#__PURE__*/component(mergedCheckboxConfig);
var mergedButtonConfig = /*#__PURE__*/mergeConfig(buttonConfig);
var ButtonBase = /*#__PURE__*/component(mergedButtonConfig);
var mergedDividerConfig = /*#__PURE__*/mergeConfig(dividerConfig);
var Divider = /*#__PURE__*/component(mergedDividerConfig);
var mergedLinkButtonConfig = /*#__PURE__*/mergeConfig(linkButtonConfig);
var LinkButtonBase = /*#__PURE__*/component(mergedLinkButtonConfig);
var base = "b1lxisuf";
var _exp = function _exp() {
  return function (_ref) {
    var maxHeight = _ref.maxHeight;
    return maxHeight || 'none';
  };
};
var ScrollableWrapper = /*#__PURE__*/styled('div')({
  name: "ScrollableWrapper",
  "class": "s15d4jbz",
  propsAsIs: false,
  vars: {
    "s15d4jbz-0": [/*#__PURE__*/_exp()]
  }
});
var _exp8 = function _exp8() {
  return function (_ref2) {
    var borderVariant = _ref2.borderVariant;
    return borderVariant === 'all' ? "var(".concat(tableTokens.borderColor, ")") : 'transparent';
  };
};
var Table = /*#__PURE__*/styled('table')({
  name: "Table",
  "class": "t1ri3no5",
  propsAsIs: false,
  vars: {
    "t1ri3no5-0": [/*#__PURE__*/_exp8()]
  }
});
var _exp9 = function _exp9() {
  return function (_ref3) {
    var selected = _ref3.selected;
    return selected ? 'var(--surface-transparent-accent)' : 'transparent';
  };
};
var Tr = /*#__PURE__*/styled('tr')({
  name: "Tr",
  "class": "t1uk535o",
  propsAsIs: false,
  vars: {
    "t1uk535o-0": [/*#__PURE__*/_exp9()]
  }
});
var _exp10 = function _exp10() {
  return function (_ref4) {
    var stickyHeader = _ref4.stickyHeader;
    return stickyHeader ? 'sticky' : 'static';
  };
};
var _exp11 = function _exp11() {
  return function (_ref5) {
    var stickyHeader = _ref5.stickyHeader;
    return stickyHeader ? 'var(--background-primary)' : 'transparent';
  };
};
var _exp12 = function _exp12() {
  return function (_ref6) {
    var view = _ref6.view,
      borderVariant = _ref6.borderVariant;
    return (
      // eslint-disable-next-line no-nested-ternary
      view === 'clear' ? 'none' : borderVariant === 'header' || borderVariant === 'rows' ? "inset 0 -1px 0 0 var(".concat(tableTokens.borderColor, ")") : "inset 0 1px 0 0 var(".concat(tableTokens.borderColor, "), inset 0 -1px 0 0 var(").concat(tableTokens.borderColor, ")")
    );
  };
};
var Thead = /*#__PURE__*/styled('thead')({
  name: "Thead",
  "class": "t1ezol8",
  propsAsIs: false,
  vars: {
    "t1ezol8-0": [/*#__PURE__*/_exp10()],
    "t1ezol8-1": [/*#__PURE__*/_exp11()],
    "t1ezol8-2": [/*#__PURE__*/_exp12()]
  }
});
var Tbody = /*#__PURE__*/styled('tbody')({
  name: "Tbody",
  "class": "t18b5m0z",
  propsAsIs: false
});
var _exp14 = function _exp14() {
  return function (_ref7) {
    var isResizing = _ref7.isResizing;
    return isResizing ? 'block' : 'none';
  };
};
var Resizer = /*#__PURE__*/styled('div')({
  name: "Resizer",
  "class": "redz16",
  propsAsIs: false,
  vars: {
    "redz16-0": [/*#__PURE__*/_exp14()]
  }
});
var _exp15 = function _exp15() {
  return function (_ref8) {
    var selectionCell = _ref8.selectionCell;
    return selectionCell ? "var(".concat(tableTokens.checkboxCellPadding, ")") : "var(".concat(tableTokens.cellPadding, ")");
  };
};
var _exp17 = function _exp17() {
  return function (_ref9) {
    var borderVariant = _ref9.borderVariant;
    return borderVariant === 'all' ? "var(".concat(tableTokens.borderColor, ")") : 'transparent';
  };
};
var Th = /*#__PURE__*/styled('th')({
  name: "Th",
  "class": "t3mgb7q",
  propsAsIs: false,
  vars: {
    "t3mgb7q-0": [/*#__PURE__*/_exp15()],
    "t3mgb7q-1": [/*#__PURE__*/_exp17()]
  }
});
var _exp19 = function _exp19() {
  return Checkbox;
};
var StyledCheckbox = /*#__PURE__*/styled(_exp19())({
  name: "StyledCheckbox",
  "class": "s177cehz",
  propsAsIs: true
});
var _exp34 = function _exp34() {
  return Divider;
};
var StyledDivider = /*#__PURE__*/styled(_exp34())({
  name: "StyledDivider",
  "class": "seus4rw",
  propsAsIs: true
});
var _exp38 = function _exp38() {
  return ButtonBase;
};
var Button = /*#__PURE__*/styled(_exp38())({
  name: "Button",
  "class": "bfybxxj",
  propsAsIs: true
});
var _exp54 = function _exp54() {
  return Button;
};
var ButtonAccent = /*#__PURE__*/styled(_exp54())({
  name: "ButtonAccent",
  "class": "b1ql6jvb",
  propsAsIs: true
});
var _exp60 = function _exp60() {
  return LinkButtonBase;
};
var LinkButton = /*#__PURE__*/styled(_exp60())({
  name: "LinkButton",
  "class": "lq32ky6",
  propsAsIs: true
});

export { Button, ButtonAccent, LinkButton, Resizer, ScrollableWrapper, StyledCheckbox, StyledDivider, Table, Tbody, Th, Thead, Tr, base };
//# sourceMappingURL=Table.styles.js.map
