"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledDivider = void 0;

var _index = require("../styles/index");

var _constants = require("./constants");

/*
Copyright (c) Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
var StyledDivider = (0, _index.styled)('hr', function (props) {
  var $theme = props.$theme,
      _props$$size = props.$size,
      $size = _props$$size === void 0 ? _constants.SIZE.section : _props$$size;

  if ($size === _constants.SIZE.cell) {
    return {
      borderTopWidth: '1px',
      borderTopColor: $theme.colors.borderOpaque,
      borderTopStyle: 'solid',
      // base styles
      borderRightWidth: 0,
      borderBottomWidth: 0,
      borderLeftWidth: 0,
      borderRightStyle: 'none',
      borderBottomStyle: 'none',
      borderLeftStyle: 'none'
    };
  }

  if ($size === _constants.SIZE.module) {
    return {
      borderTopWidth: '8px',
      borderTopColor: $theme.colors.backgroundTertiary,
      borderTopStyle: 'solid',
      // base styles
      borderRightWidth: 0,
      borderBottomWidth: 0,
      borderLeftWidth: 0,
      borderRightStyle: 'none',
      borderBottomStyle: 'none',
      borderLeftStyle: 'none'
    };
  }

  return {
    borderTopWidth: '2px',
    borderTopColor: $theme.colors.borderOpaque,
    borderTopStyle: 'solid',
    // base styles
    borderRightWidth: 0,
    borderBottomWidth: 0,
    borderLeftWidth: 0,
    borderRightStyle: 'none',
    borderBottomStyle: 'none',
    borderLeftStyle: 'none'
  };
});
exports.StyledDivider = StyledDivider;
StyledDivider.displayName = "StyledDivider";