import React from 'react';
import styled from 'styled-components';
var StyledThead = styled.thead.withConfig({
  displayName: "Thead__StyledThead",
  componentId: "sc-ck14n6-0"
})(["width:100%;border-bottom:1px solid ", ";"], function (p) {
  return p.theme.color.divider;
});
var StyledStickyThead = styled(StyledThead).withConfig({
  displayName: "Thead__StyledStickyThead",
  componentId: "sc-ck14n6-1"
})(["border:0;th{position:sticky;top:0;z-index:1;background-color:", ";}th::before{left:0;width:100%;bottom:0;height:100%;content:'';position:absolute;border-bottom:1px solid ", ";}"], function (p) {
  return p.theme.color.card;
}, function (p) {
  return p.theme.color.divider;
});
export var Thead = function Thead(_ref) {
  var _ref$stickyHeader = _ref.stickyHeader,
    stickyHeader = _ref$stickyHeader === void 0 ? false : _ref$stickyHeader,
    children = _ref.children;
  return stickyHeader ? React.createElement(StyledStickyThead, null, children) : React.createElement(StyledThead, null, children);
};