import { c as y } from "../../../../sdk/dist/shared/chunk-VZPXXFVX.js";
import "@sinclair/typebox";
import { propToStyle as l, propToClass as i } from "../../../../sdk/dist/shared/themes/color-system.js";
import { css as n } from "../../../../style-system/dist/twind.js";
function f(t) {
  return t ? [
    t.color && l(t.color, "backgroundColor"),
    t.image && n({
      backgroundImage: `url(${t.image})`,
      backgroundSize: t.size ?? "auto",
      backgroundRepeat: t.repeat ?? "no-repeat"
    })
  ] : null;
}
function u(t, e) {
  return e ? `@desktop:(${n({ gap: t })}) @mobile:(${n({ gap: e })})` : n({
    gap: t
  });
}
function g(t, e) {
  return e ? `@desktop:(${i(t, "bg-color")}) @mobile:(${i(e, "bg-color")})` : i(t, "bg");
}
function d(t, e) {
  return l(t, "color");
}
function a(t) {
  return l(t, "opacity");
}
function s(t, e, r) {
  if (r?.["ui:desktop-only"])
    return `@desktop:(${t})`;
  if (!e)
    return t;
  if (t && e)
    return `@desktop:(${t}) @mobile:(${e})`;
  if (e)
    return `@mobile:(${e})`;
}
function p(t, e, r) {
  if (r?.["ui:desktop-only"])
    return `@desktop:(${Object.values(t).join(" ")})`;
  if (t && !e)
    return Object.values(t);
  if (t && e)
    return `@desktop:(${Object.values(t).join(" ")}) @mobile:(${Object.values(e).join(" ")})`;
  if (e)
    return `@mobile:(${Object.values(e).join(" ")})`;
}
function k(t) {
  return t ? "sticky top-0 left-0 right-0 self-start w-fill z-[99999] isolate" : null;
}
function S(t, e) {
  return t;
}
function $(t, e, r) {
  if (r?.["ui:desktop-only"])
    return "@desktop:(flex-grow)";
  if (t && e)
    return "flex-grow";
  if (!e)
    return t ? "@desktop:(flex-grow)" : null;
  if (e)
    return "@mobile:(flex-grow) @desktop:(grow-0)";
}
function c(t, e, r) {
  const o = r?.["ui:presets"] ?? y;
  if (r?.["ui:desktop-only"])
    return `@desktop:(${o[t]?.className})`;
  if (!e)
    return o[t]?.className;
  if (t && e)
    return `@desktop:(${o[t]?.className}) @mobile:(${o[e]?.className})`;
  if (e)
    return `@mobile:(${o[e]?.className})`;
}
const w = {
  "presets:color": c,
  "styles:gradientDirection": s
}, x = {
  "styles:color": d,
  "styles:basicGap": S,
  "styles:textShadow": s,
  "styles:opacity": a,
  "styles:objectFit": s,
  "styles:objectPosition": s,
  "styles:heroSize": s,
  "styles:fontSize": s,
  "styles:padding": s,
  // test
  "styles:gap": u,
  "styles:gradientDirection": s,
  "styles:backgroundColor": g,
  "styles:background": f,
  "presets:color": c,
  "styles:borderColor": s,
  "styles:rounding": s,
  "styles:direction": s,
  // test putting here
  "styles:alignItems": s,
  "styles:justifyContent": s,
  "styles:border": p,
  // "styles:rounding": simpleClassHandler,
  "styles:shadow": s
}, O = {
  "styles:direction": s,
  "styles:rounding": s,
  "styles:justifyContent": s,
  "styles:alignItems": s,
  "styles:fixedPositioned": k,
  "styles:alignSelf": s,
  "styles:grow": $
};
function z(t) {
  return t.includes(".") ? t.split(".").slice(0, -1).join(".") : t;
}
export {
  x as brickStylesHelpersMap,
  O as brickWrapperStylesHelpersMap,
  z as extractStylePath,
  f as getBackgroundStyles,
  S as getBasicGapStyles,
  u as getGapStyles,
  w as pageStylesHelpersMap,
  p as simpleClassHandleObject,
  s as simpleClassHandler
};
//# sourceMappingURL=helpers.js.map
