"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const styled_components_1 = require("styled-components");
const color_tool_1 = require("../../_utils/color-tool");
const FormStyle = styled_components_1.createGlobalStyle `${styled_components_1.css `
  .ant-form {
    .ant-form-item {
      margin-bottom: 16px;
      &-label {
        color: ${({ theme }) => theme.text.secondary};
        overflow: visible;
        & > label {
          color: ${({ theme }) => theme.text.secondary};
          width: 100%;
          white-space: pre-wrap;
        }
      }
      &.ant-form-item-with-help {
        margin-bottom: 0;
      }
    }
    .ant-form-item-has-error {
      .ant-select:not(.ant-select-borderless) {
        .ant-select-selector {
          border-color: ${({ theme }) => theme.danger} !important;
        }
      }
      .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) {
        .ant-select-selector {
          background-color: ${({ theme }) => theme.background.content.primary};
        }
      }
      .ant-input:not(.ant-input-disabled),
      .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled),
      .ant-picker,
      .ant-input-group,
      .ant-input-number:not(.ant-input-number-disabled) {
        border-color: ${({ theme }) => theme.danger};
        background-color: ${({ theme }) => theme.background.content.primary};

        &:not([disabled]) {
          &:hover {
            border-color: ${({ theme }) => theme.danger};
            background-color: ${({ theme }) => theme.background.content.primary};
          }
        }
        &:focus {
          border-color: ${({ theme }) => theme.danger};
          box-shadow: 0 0 0 2px ${({ theme }) => color_tool_1.rgba(theme.danger, 0.2)};
        }
      }

      .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper {
        border-color: ${({ theme }) => theme.danger} !important;
        &::before {
          background-color: ${({ theme }) => theme.danger};
        }
      }
      .ant-input-number-focused,
      .ant-picker-focused {
        border-color: ${({ theme }) => theme.danger};
        box-shadow: 0 0 0 2px ${({ theme }) => color_tool_1.rgba(theme.danger, 0.2)};
      }
    }

    /** 错误解释文本 */
    .ant-form-item-explain {
      min-height: 16px;

      color: ${({ theme }) => theme.danger};

      font-size: 12px;
      line-height: 14px;
    }
  }
`}`;
exports.default = FormStyle;
