"use strict";

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

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

var formLabelStyle = function formLabelStyle(_ref, theme) {
  var isDisabled = _ref.isDisabled;
  return {
    style: {
      pr: 'spacing-sm',
      pb: 'spacing-sm',
      color: isDisabled ? 'disabled' : 'faintText',
      fontWeight: 'medium',
      textAlign: 'left',
      cursor: 'pointer',
      kind: 'small',
      verticalAlign: 'middle',
      display: 'block',
      whiteSpace: 'nowrap'
    },
    requiredIndicator: {
      color: 'error.500',
      ml: 'spacing-sm'
    }
  };
};

exports.formLabelStyle = formLabelStyle;

var useFormLabelStyle = function useFormLabelStyle(props) {
  var theme = (0, _ThemeProvider.useTheme)();
  var styles = theme['styles'].formLabel ? theme['styles'].formLabel(props, theme) : formLabelStyle(props, theme);
  return {
    // base style
    root: styles.style,
    requiredIndicator: styles.requiredIndicator
  };
};

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