import { c as s } from "../../../../_virtual/index4.js";
import { create as a } from "../../../../node_modules/.pnpm/free-style@5.0.1/node_modules/free-style/dist/index.js";
import { l as c } from "../../../../_virtual/lodash.js";
import { clsx as l } from "../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
import { twMerge as i } from "../../../../node_modules/.pnpm/tailwind-merge@3.0.1/node_modules/tailwind-merge/dist/bundle-mjs.js";
const d = s.init({
  length: 8
}), b = () => ({
  id: "root",
  type: "root",
  parentId: "",
  children: [],
  settings: {}
}), h = (t) => ({
  id: t.id ?? d(),
  children: t.children ?? [],
  ...t
}), S = (t) => ({
  label: t.label ?? c.startCase(t.type),
  settings: t.settings ?? {},
  controls: t.controls ?? [],
  ...t
}), k = () => {
  const t = a(), r = t.registerStyle.bind(t), o = t.getStyles.bind(t);
  return {
    register: r,
    get: o
  };
};
function w(...t) {
  return i(l(t));
}
function x(t) {
  return Object.keys(t);
}
const B = (t) => t, I = (t) => new Promise((r, o) => {
  const e = new FileReader();
  e.readAsDataURL(t), e.onload = () => r(e.result), e.onerror = (n) => o(n);
}), f = () => Date.now().toString(36) + Math.random().toString(36).substring(2);
export {
  w as classNames,
  h as createBlock,
  S as createBlockConfig,
  d as createId,
  b as createRootBlock,
  k as createStyle,
  I as fileToBase64,
  B as generateImageUrl,
  f as generateUniqueId,
  x as objectKeys
};
//# sourceMappingURL=index.js.map
