"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.toggleGroupStyle = void 0;

var _ThemeProvider = require("../ThemeProvider");

var toggleGroupStyle = function toggleGroupStyle(_ref, theme) {
  var isChecked = _ref.isChecked,
      isFullWidth = _ref.isFullWidth;
  return {
    style: {
      width: isFullWidth ? '100%' : 'fit-content',
      border: '1px',
      borderColor: 'border',
      borderRadius: 'lg',
      d: 'inline-flex'
    },
    toggleButton: {
      variant: isChecked ? 'primary' : 'secondary',
      borderRadius: 'lg',
      boxShadow: 0,
      _focus: null,
      _hover: null,
      flex: isFullWidth && 1
    }
  };
};

exports.toggleGroupStyle = toggleGroupStyle;

var useToggleGroupStyle = function useToggleGroupStyle(props) {
  var theme = (0, _ThemeProvider.useTheme)();
  var styles = theme['styles'].toggleGroup ? theme['styles'].toggleGroup(props, theme) : toggleGroupStyle(props, theme);
  return {
    // toggle group style
    root: styles.style,
    // single toggle button option style
    toggleButton: styles.toggleButton
  };
};

var _default = useToggleGroupStyle;
exports["default"] = _default;
//# sourceMappingURL=styles.js.map