import { SizeType as u } from "../../../types/style.js";
import { generateResponsiveStyle as S, generatePseudoStyle as v, generateTypographyStyles as L } from "../../../utils/style.js";
import { d as R } from "../../../../../../_virtual/index2.js";
import { l as T } from "../../../../../../_virtual/lodash.js";
function z({
  size: o,
  padding: t
}) {
  switch (o) {
    case u.SM:
      return {
        paddingTop: t != null && t.top ? `${t.top}${t.unit}` : "0.25rem",
        paddingBottom: t != null && t.bottom ? `${t.bottom}${t.unit}` : "0.25rem",
        paddingLeft: t != null && t.left ? `${t.left}${t.unit}` : "1rem",
        paddingRight: t != null && t.right ? `${t.right}${t.unit}` : "1rem"
      };
    case u.MD:
      return {
        paddingTop: t != null && t.top ? `${t.top}${t.unit}` : "0.5rem",
        paddingBottom: t != null && t.bottom ? `${t.bottom}${t.unit}` : "0.5rem",
        paddingLeft: t != null && t.left ? `${t.left}${t.unit}` : "1.5rem",
        paddingRight: t != null && t.right ? `${t.right}${t.unit}` : "1.5rem"
      };
    case u.LG:
      return {
        paddingTop: t != null && t.top ? `${t.top}${t.unit}` : "0.75rem",
        paddingBottom: t != null && t.bottom ? `${t.bottom}${t.unit}` : "0.75rem",
        paddingLeft: t != null && t.left ? `${t.left}${t.unit}` : "1.5rem",
        paddingRight: t != null && t.right ? `${t.right}${t.unit}` : "1.5rem"
      };
    case u.XL:
      return {
        paddingTop: t != null && t.top ? `${t.top}${t.unit}` : "1rem",
        paddingBottom: t != null && t.bottom ? `${t.bottom}${t.unit}` : "1rem",
        paddingLeft: t != null && t.left ? `${t.left}${t.unit}` : "2rem",
        paddingRight: t != null && t.right ? `${t.right}${t.unit}` : "2rem"
      };
    case u.XXL:
      return {
        paddingTop: t != null && t.top ? `${t.top}${t.unit}` : "1.5rem",
        paddingBottom: t != null && t.bottom ? `${t.bottom}${t.unit}` : "1.5rem",
        paddingLeft: t != null && t.left ? `${t.left}${t.unit}` : "3rem",
        paddingRight: t != null && t.right ? `${t.right}${t.unit}` : "3rem"
      };
    default:
      return {
        paddingTop: t != null && t.top ? `${t.top}${t.unit}` : "0.5rem",
        paddingBottom: t != null && t.bottom ? `${t.bottom}${t.unit}` : "0.5rem",
        paddingLeft: t != null && t.left ? `${t.left}${t.unit}` : "1rem",
        paddingRight: t != null && t.right ? `${t.right}${t.unit}` : "1rem"
      };
  }
}
function D(o, t) {
  const y = {
    ...L(
      `button-preset-${o.id}`,
      o.value.typography ?? {},
      t
    ),
    ...v((r) => {
      var e, $, m, b, l, h, f, c;
      return {
        color: ((e = o.value.color) == null ? void 0 : e[r]) && `var(--button-preset-${o.id}-${r}-color)`,
        backgroundColor: ((m = ($ = o.value.background) == null ? void 0 : $.color) == null ? void 0 : m[r]) && `var(--button-preset-${o.id}-${r}-background-color)`,
        borderColor: ((b = o.value.borderColor) == null ? void 0 : b[r]) && `var(--button-preset-${o.id}-${r}-border-color)`,
        borderStyle: (l = o.value.borderStyle) != null && l[r] ? `var(--button-preset-${o.id}-${r}-border-style)` : void 0,
        borderWidth: ((h = o.value.borderWidth) == null ? void 0 : h[r]) && `var(--button-preset-${o.id}-${r}-border-width)`,
        borderRadius: ((f = o.value.borderRadius) == null ? void 0 : f[r]) && `var(--button-preset-${o.id}-${r}-border-radius)`,
        boxShadow: ((c = o.value.boxShadow) == null ? void 0 : c[r]) && `var(--button-preset-${o.id}-${r}-box-shadow)`
      };
    }),
    ...S(t, (r) => ({
      ...v((e) => {
        var $, m;
        return {
          padding: ((m = ($ = o.value.padding) == null ? void 0 : $[r]) == null ? void 0 : m[e]) && `var(--button-preset${o.id}-${e}-${r}-padding)`
        };
      })
    }))
  };
  return R.clean(T.cloneDeep(y));
}
export {
  D as generatePresetStyle,
  z as generateSize
};
//# sourceMappingURL=index.js.map
