import './EditableCell.styles_1jsdqcw.css';
import { styled } from '@linaria/react';
import { tableTokens } from '../../Table.tokens.js';
import { component, mergeConfig } from '../../../../engines/common.js';
import { iconButtonConfig } from '../../../IconButton/IconButton.js';

var mergedIndicatorConfig = /*#__PURE__*/mergeConfig(iconButtonConfig);
var IconButton = /*#__PURE__*/component(mergedIndicatorConfig);
var _exp = function _exp() {
  return function (_ref) {
    var selectionCell = _ref.selectionCell,
      editingMode = _ref.editingMode;
    return (
      // eslint-disable-next-line no-nested-ternary
      editingMode ? "var(".concat(tableTokens.editableCellPadding, ")") : selectionCell ? "var(".concat(tableTokens.checkboxCellPadding, ")") : "var(".concat(tableTokens.cellPadding, ")")
    );
  };
};
var _exp3 = function _exp3() {
  return function (_ref2) {
    var selected = _ref2.selected,
      borderVariant = _ref2.borderVariant,
      view = _ref2.view;
    return (
      // eslint-disable-next-line no-nested-ternary
      borderVariant === 'all' && view !== 'clear' ? "var(".concat(tableTokens.borderColor, ")") : selected ? 'var(--surface-transparent-accent)' : 'transparent'
    );
  };
};
var _exp4 = function _exp4() {
  return function (_ref3) {
    var borderVariant = _ref3.borderVariant;
    return borderVariant === 'all' || borderVariant === 'rows' ? "var(".concat(tableTokens.borderColor, ")") : 'transparent';
  };
};
var Td = /*#__PURE__*/styled('td')({
  name: "Td",
  "class": "tv47xfg",
  propsAsIs: false,
  vars: {
    "tv47xfg-0": [/*#__PURE__*/_exp()],
    "tv47xfg-1": [/*#__PURE__*/_exp3()],
    "tv47xfg-2": [/*#__PURE__*/_exp4()]
  }
});
var InnerWrapper = /*#__PURE__*/styled('div')({
  name: "InnerWrapper",
  "class": "ie48x46",
  propsAsIs: false
});
var ContentWrapper = /*#__PURE__*/styled('div')({
  name: "ContentWrapper",
  "class": "c15rdc1b",
  propsAsIs: false
});
var EditModeWrapper = /*#__PURE__*/styled('div')({
  name: "EditModeWrapper",
  "class": "esei9ny",
  propsAsIs: false
});
var InputWrapper = /*#__PURE__*/styled('div')({
  name: "InputWrapper",
  "class": "ibr7168",
  propsAsIs: false
});
var Input = /*#__PURE__*/styled('input')({
  name: "Input",
  "class": "i1s1uyw4",
  propsAsIs: false
});
var _exp17 = function _exp17() {
  return IconButton;
};
var IconDoneButton = /*#__PURE__*/styled(_exp17())({
  name: "IconDoneButton",
  "class": "i1sxq9gk",
  propsAsIs: true
});
var _exp22 = function _exp22() {
  return IconButton;
};
var IconResetButton = /*#__PURE__*/styled(_exp22())({
  name: "IconResetButton",
  "class": "i186nyk5",
  propsAsIs: true
});

export { ContentWrapper, EditModeWrapper, IconDoneButton, IconResetButton, InnerWrapper, Input, InputWrapper, Td };
