/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-f1f3d22 | Cube Dev Team */
import { parseStyle } from "../utils/styles.js";

//#region src/tasty/styles/reset.ts
const AUTOFILL_STYLES = {
	"caret-color": "var(--primary-color)",
	"-webkit-text-fill-color": "var(--primary-color)",
	"-webkit-box-shadow": "0 0 0px 9999rem var(--white-color) inset",
	"box-shadow": "0 0 0px 9999rem var(--white-color) inset",
	"font-family": "inherit",
	"font-size": "inherit",
	"line-height": "inherit"
};
const RESET_MAP = {
	input: [
		{
			"-webkit-appearance": "none",
			"word-spacing": "initial",
			"-webkit-text-fill-color": "currentColor"
		},
		{
			$: "::-webkit-search-cancel-button",
			display: "none"
		},
		{
			$: ":-webkit-autofill",
			...AUTOFILL_STYLES
		},
		{
			$: ":-webkit-autofill:hover",
			...AUTOFILL_STYLES
		},
		{
			$: ":-webkit-autofill:focus",
			...AUTOFILL_STYLES
		},
		{
			$: "[disabled]",
			"-webkit-opacity": "1"
		},
		{
			$: "::placeholder",
			"-webkit-text-fill-color": "var(--placeholder-color, initial)",
			color: "var(--placeholder-color, initial)"
		},
		{
			$: "::-webkit-search-cancel-button",
			display: "none",
			"-webkit-appearance": "none"
		}
	],
	button: [{ "-webkit-tap-highlight-color": "transparent" }]
};
function resetStyle({ reset }) {
	if (!reset) return;
	const { mods } = parseStyle(reset).groups[0] ?? { mods: [] };
	const result = [];
	for (const mod of mods) if (RESET_MAP[mod]) result.push(...RESET_MAP[mod]);
	return result.length ? result : void 0;
}
resetStyle.__lookupStyles = ["reset"];

//#endregion
export { resetStyle };
//# sourceMappingURL=reset.js.map