"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableColumn = exports.TableColumnHeader = exports.TableRow = exports.TableHeader = exports.TableBody = exports.Table = exports.TableInnerWrapper = exports.TableWrapper = void 0;
const styled_system_1 = require("styled-system");
const styles_1 = require("../../styles");
const theme_1 = require("../../styles/theme");
exports.TableWrapper = styles_1.styled.div `
  margin: 0;
  padding: 0;
`;
exports.TableInnerWrapper = styles_1.styled.div `
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: auto;
`;
exports.Table = styles_1.styled.table `
  margin: 0;
  padding: 0;
  border-collapse: collapse;
  min-width: 100%;
`;
exports.TableBody = styles_1.styled.tbody `
  margin: 0;
  padding: 0;
`;
exports.TableHeader = styles_1.styled.thead `
  margin: 0;
  padding: 0;
`;
exports.TableRow = styles_1.styled.tr `
  margin: 0;
  padding: 0;
  color: ${theme_1.theme.colors.gray[1]};
  cursor: ${({ onClick }) => (onClick ? 'pointer' : 'default')};
  ${({ borderBottom: borderBottomProp }) => borderBottomProp
    ? `border-bottom: ${borderBottomProp};`
    : `border-bottom: 2px solid ${theme_1.theme.colors.gray[4]};`}

  ${({ paginate }) => paginate || styled_system_1.borderBottom
    ? ''
    : `&:last-child {
          border-bottom: 0;
        }`}

  &.selected,
  &:hover {
    td {
      background-color: ${theme_1.theme.colors.gray[4]};
    }
  }

  &.hide {
    display: none;
  }

  &:hover {
    .showOnHover {
      opacity: 1;
      pointer-events: all;
    }
  }
`;
exports.TableColumnHeader = styles_1.styled.th(styled_system_1.border, styled_system_1.borderTop, styled_system_1.borderRight, styled_system_1.borderBottom, styled_system_1.borderLeft, styled_system_1.borderWidth, styled_system_1.borderColor, styled_system_1.borderRadius, styled_system_1.borderStyle, (props) => `
  margin: 0;
  padding: ${props.padding || '10px 15px'};
  text-align: ${props.textAlign || 'left'};
  color: ${theme_1.theme.colors.gray[2]};
  line-height: ${theme_1.theme.lineHeights.lessTight};
`);
exports.TableColumn = styles_1.styled.td(styled_system_1.border, styled_system_1.borderTop, styled_system_1.borderRight, styled_system_1.borderBottom, styled_system_1.borderLeft, styled_system_1.borderWidth, styled_system_1.borderColor, styled_system_1.borderRadius, styled_system_1.borderStyle, (props) => `
  margin: 0;
  padding: ${props.padding || '3px 15px'};
  white-space: nowrap;
  line-height: ${props.lineHeight || 'initial'};
  text-align: ${props.textAlign || 'left'};

  .canEdit {
    cursor: pointer;
  }

  .editIcon {
    opacity: 0;
    transition: opacity 0.3s;
  }

  &:hover {
    .editIcon {
      opacity: 1;
    }
  }

  .showOnHover {
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
  }
`);
//# sourceMappingURL=styles.js.map