import { genStyleHooks } from "../../theme/genStyleUtils.js";
import genSenderHeaderStyle from "./header.js";
import genSlotTextAreaStyle from "./slot-textarea.js";
import genSenderSwitchStyle from "./switch.js";
import { mergeToken } from "@antdv-next/cssinjs/cssinjs-utils";
import { FastColor } from "@ant-design/fast-color";
//#region components/sender/style/index.ts
var genSenderStyle = (token) => {
	const { antCls, componentCls, paddingSM, paddingXS, paddingXXS, lineWidth, calc } = token;
	return { [componentCls]: {
		[`&${componentCls}-main`]: {
			position: "relative",
			width: "100%",
			boxSizing: "border-box",
			boxShadow: `${token.boxShadowTertiary}`,
			borderRadius: {
				_skip_check_: true,
				value: calc(token.borderRadius).mul(2).equal()
			},
			borderColor: token.colorBorderInput,
			borderWidth: lineWidth,
			borderStyle: "solid"
		},
		[`&${componentCls}-disabled`]: {
			background: token.colorBgContainerDisabled,
			borderColor: "transparent"
		},
		[`&${componentCls}-rtl`]: { direction: "rtl" },
		[`${componentCls}-content`]: {
			display: "flex",
			gap: paddingXS,
			width: "100%",
			paddingBlock: paddingSM,
			paddingInlineStart: paddingSM,
			paddingInlineEnd: paddingSM,
			boxSizing: "border-box",
			alignItems: "flex-end"
		},
		[`${componentCls}-prefix`]: { flex: "none" },
		[`${componentCls}-input`]: {
			paddingInline: 0,
			borderRadius: 0,
			flex: "auto",
			alignSelf: "center",
			caretColor: token.colorPrimary,
			fontSize: token.fontSize
		},
		[`${componentCls}-actions-list`]: {
			flex: "none",
			display: "flex",
			"&-presets": { gap: token.paddingXS }
		},
		[`${componentCls}-actions-btn`]: {
			[`&-disabled:where(${antCls}-btn-variant-text)`]: {
				color: token.colorTextActionsDisabled,
				borderColor: "transparent"
			},
			[`&-disabled:not(${antCls}-btn-variant-text)`]: {
				background: token.colorBgActionsDisabled,
				color: token.colorTextLightSolid,
				borderColor: "transparent"
			},
			"&-loading-button": {
				padding: 0,
				border: 0
			},
			"&-loading-icon": {
				height: token.controlHeight,
				width: token.controlHeight,
				verticalAlign: "top"
			},
			"&-recording-icon": {
				height: "1.2em",
				width: "1.2em",
				verticalAlign: "top"
			}
		},
		[`${componentCls}-footer`]: {
			paddingInlineStart: paddingSM,
			paddingInlineEnd: paddingSM,
			paddingBlockEnd: paddingSM,
			paddingBlockStart: paddingXXS,
			boxSizing: "border-box"
		}
	} };
};
var prepareComponentToken = (token) => {
	const { colorPrimary, colorFillTertiary } = token;
	const colorBgSlot = new FastColor(colorPrimary).setA(.06).toRgbString();
	const colorBgSkill = new FastColor(colorPrimary).setA(.08).toRgbString();
	const colorBgSkillHover = new FastColor(colorPrimary).setA(.15).toRgbString();
	const colorTextSlot = colorPrimary;
	const colorTextSlotPlaceholder = new FastColor(colorPrimary).setA(.25).toRgbString();
	const colorBorderSlotHover = new FastColor(colorPrimary).setA(.1).toRgbString();
	const colorBorderSlot = colorBgSlot;
	const colorBorderInput = new FastColor(colorFillTertiary).setA(.1).toRgbString();
	const switchCheckedBg = new FastColor(colorPrimary).setA(.08).toRgbString();
	const switchCheckedHoverBg = new FastColor(colorPrimary).setA(.1).toRgbString();
	const switchUncheckedHoverBg = new FastColor(colorFillTertiary).setA(.04).toRgbString();
	const colorBgActionsDisabled = new FastColor(colorPrimary).setA(.45).toRgbString();
	return {
		colorBgSlot,
		colorBgSkill,
		colorBgSkillHover,
		colorTextSlot,
		colorTextSlotPlaceholder,
		colorBorderSlotHover,
		colorBorderSlot,
		colorBorderInput,
		switchCheckedBg,
		switchCheckedHoverBg,
		switchUncheckedHoverBg,
		colorBgActionsDisabled,
		colorTextActionsDisabled: colorBgActionsDisabled
	};
};
var style_default = genStyleHooks("Sender", (token) => {
	const { paddingXS, calc } = token;
	const senderToken = mergeToken(token, { SenderContentMaxWidth: `calc(100% - ${calc(paddingXS).add(32).equal()}px)` });
	return [
		genSenderStyle(senderToken),
		genSenderHeaderStyle(senderToken),
		genSenderSwitchStyle(senderToken),
		genSlotTextAreaStyle(senderToken)
	];
}, prepareComponentToken);
//#endregion
export { style_default as default, prepareComponentToken };
