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