import * as __WEBPACK_EXTERNAL_MODULE__ant_design_cssinjs__ from "@ant-design/cssinjs";
import * as __WEBPACK_EXTERNAL_MODULE_antd_style__ from "antd-style";
function _tagged_template_literal(strings, raw) {
    if (!raw) raw = strings.slice(0);
    return Object.freeze(Object.defineProperties(strings, {
        raw: {
            value: Object.freeze(raw)
        }
    }));
}
function _templateObject() {
    const data = _tagged_template_literal([
        "\n      .",
        "-input {\n        padding: 3px 7px;\n        border-width: ",
        ";\n        border-style: ",
        ";\n        border-color: ",
        ";\n        font-size: ",
        ";\n        line-height: ",
        ";\n        &:hover {\n          border-color: ",
        ";\n        }\n        &:focus {\n          border-color: ",
        ";\n          outline: none;\n        }\n      }\n    "
    ]);
    _templateObject = function() {
        return data;
    };
    return data;
}
function _templateObject1() {
    const data = _tagged_template_literal([
        "\n      display: flex;\n      .ant-input {\n        flex-grow: 1;\n        min-width: 200px;\n      }\n      .ant-input-disabled {\n        .ant-tag {\n          color: #bfbfbf;\n          border-color: #d9d9d9;\n        }\n      }\n\n      > .x-button {\n        height: min-content;\n      }\n    "
    ]);
    _templateObject1 = function() {
        return data;
    };
    return data;
}
function _templateObject2() {
    const data = _tagged_template_literal([
        "\n      overflow: auto;\n      white-space: ",
        ";\n\n      .ant-tag {\n        display: inline;\n        line-height: 19px;\n        margin: 0 0.5em;\n        padding: 2px 7px;\n        border-radius: 10px;\n      }\n    "
    ]);
    _templateObject2 = function() {
        return data;
    };
    return data;
}
function _templateObject3() {
    const data = _tagged_template_literal([
        "\n      overflow: auto;\n\n      .ant-tag {\n        display: inline;\n        line-height: 19px;\n        margin: 0 0.25em;\n        padding: 2px 7px;\n        border-radius: 10px;\n      }\n    "
    ]);
    _templateObject3 = function() {
        return data;
    };
    return data;
}
function _templateObject4() {
    const data = _tagged_template_literal([
        "\n      position: relative;\n      line-height: 0;\n\n      &:hover {\n        .clear-button {\n          display: inline-block;\n        }\n      }\n\n      .ant-input {\n        overflow: auto;\n        white-space: nowrap;\n        ",
        "\n\n        .ant-tag {\n          display: inline;\n          line-height: 19px;\n          margin: 0;\n          padding: 2px 7px;\n          border-radius: 10px;\n          white-space: nowrap;\n        }\n      }\n    "
    ]);
    _templateObject4 = function() {
        return data;
    };
    return data;
}
function _templateObject5() {
    const data = _tagged_template_literal([
        "\n      margin-left: -1px;\n    "
    ]);
    _templateObject5 = function() {
        return data;
    };
    return data;
}
const useStyles = (0, __WEBPACK_EXTERNAL_MODULE_antd_style__.createStyles)((param, param1)=>{
    let { token, css, prefixCls } = param, { multiline, disabled } = param1;
    const { lineWidth, colorFillQuaternary } = token;
    const inputPaddingHorizontalBase = token.paddingSM - 1;
    const tagPaddingHorizontal = 8;
    const paddingInline = tagPaddingHorizontal - lineWidth;
    const tagFontSize = token.fontSizeSM;
    const tagLineHeight = "".concat(token.lineHeightSM * tagFontSize, "px");
    const defaultBg = colorFillQuaternary;
    return {
        fixInput: css(_templateObject(), prefixCls, (0, __WEBPACK_EXTERNAL_MODULE__ant_design_cssinjs__.unit)(token.lineWidth), token.lineType, token.colorBorder, (0, __WEBPACK_EXTERNAL_MODULE__ant_design_cssinjs__.unit)(token.fontSize), token.lineHeight, token.colorPrimaryBorderHover, token.colorPrimaryBorderHover),
        outerContainer: {
            width: 'auto',
            display: 'flex',
            '&.ant-input-group-compact': {
                display: 'flex'
            },
            '.ant-input-disabled': {
                '.ant-tag': {
                    color: '#bfbfbf',
                    borderColor: '#d9d9d9'
                }
            },
            '.ant-input.null-value': {
                width: '4em',
                minWidth: '4em'
            },
            '.ant-formily-item .ant-formily-item-control .ant-formily-item-control-content .ant-formily-item-control-content-component': {
                lineHeight: 'normal'
            },
            '.ant-formily-item': {
                marginBottom: 0
            },
            '.ant-input': {
                borderTopRightRadius: 0,
                borderBottomRightRadius: 0
            },
            '.ant-tag': {
                display: 'inline-block',
                height: 'auto',
                marginInlineEnd: token.marginXS,
                paddingInline,
                fontSize: tagFontSize,
                lineHeight: tagLineHeight,
                whiteSpace: 'nowrap',
                background: defaultBg,
                border: "".concat(token.lineWidth, "px ").concat(token.lineType, " ").concat(token.colorBorder),
                borderRadius: token.borderRadiusSM,
                opacity: 1,
                transition: "all ".concat(token.motionDurationMid),
                textAlign: 'start'
            },
            '.ant-tag-blue': {
                color: token.colorPrimaryText,
                background: token.colorPrimaryBg,
                borderColor: token.colorPrimaryBorder
            },
            '.clear-button': {
                position: 'absolute',
                top: '50%',
                insetInlineStart: 'auto',
                insetInlineEnd: inputPaddingHorizontalBase,
                zIndex: 1,
                display: 'none',
                width: token.fontSizeIcon,
                height: token.fontSizeIcon,
                marginTop: -token.fontSizeIcon / 2,
                color: token.colorTextQuaternary,
                fontSize: token.fontSizeIcon,
                fontStyle: 'normal',
                lineHeight: 1,
                textAlign: 'center',
                textTransform: 'none',
                background: token.colorBgContainer,
                cursor: 'pointer',
                opacity: 0.8,
                transition: "color ".concat(token.motionDurationMid, " ease, opacity ").concat(token.motionDurationSlow, " ease"),
                textRendering: 'auto',
                userSelect: 'none',
                '&:before': {
                    display: 'block'
                },
                '&:hover': {
                    color: token.colorTextTertiary
                }
            },
            '.ant-btn': {
                height: 'auto'
            },
            '.variable': {
                flex: 1
            }
        },
        container: css(_templateObject1()),
        button: css(_templateObject2(), multiline ? 'normal' : 'nowrap'),
        pretty: css(_templateObject3()),
        container2: css(_templateObject4(), disabled ? '' : 'padding-right: 28px;'),
        button2: css(_templateObject5())
    };
});
export { useStyles };
