import { a0 as t, w as i, ed as c, bb as s, cn as m, bB as v, eW as g, bv as h, U as y, V as a, P as p, bh as r, bi as u, bj as d, bg as o, bl as L, bn as x, bo as w, bG as f } from "./684d2f28.js";
import { lazy as j, useContext as n } from "react";
import { defaultLottie as C } from "./0a417d48.js";
import "react-dom";
const S = j(() => import("./e0100d10.js").then((l) => ({
  default: l.Player
}))), F = [{
  label: t("jsonLottie.auto"),
  value: "auto"
}, {
  label: t("jsonLottie.onHover"),
  value: "on hover"
}], V = [{
  label: t("jsonLottie.singlePlay"),
  value: "single"
}, {
  label: t("jsonLottie.endlessLoop"),
  value: "endless"
}], k = [{
  label: "0.5x",
  value: "0.5"
}, {
  label: "0.75x",
  value: "0.75"
}, {
  label: "1x",
  value: "1"
}, {
  label: "1.5x",
  value: "1.5"
}, {
  label: "2x",
  value: "2"
}, {
  label: "2.5x",
  value: "2.5"
}, {
  label: "5x",
  value: "5"
}, {
  label: "10x",
  value: "10"
}];
let b = function() {
  const l = {
    value: i(c, JSON.stringify(C, null, 2)),
    speed: s(k, "1"),
    width: i(m, 100),
    height: i(m, 100),
    container: v(g),
    animationStart: s(F, "auto"),
    loop: s(V, "single"),
    keepLastFrame: h.DEFAULT_TRUE
  };
  return new y(l, (e) => /* @__PURE__ */ a("div", {
    style: {
      padding: `${e.container.margin}`
    },
    children: /* @__PURE__ */ a("div", {
      style: {
        height: "100%",
        display: "flex",
        justifyContent: "center",
        backgroundColor: `${e.container.background}`,
        padding: `${e.container.padding}`
      },
      children: /* @__PURE__ */ a(S, {
        keepLastFrame: e.keepLastFrame,
        autoplay: e.animationStart === "auto" && !0,
        hover: e.animationStart === "on hover" && !0,
        loop: e.loop !== "single",
        speed: Number(e.speed),
        src: e.value,
        style: {
          height: "100%",
          width: "100%",
          maxWidth: "100%",
          maxHeight: "100%"
        }
      }, [e.speed, e.animationStart, e.loop, e.value, e.keepLastFrame])
    })
  })).setPropertyViewFn((e) => /* @__PURE__ */ p(r, {
    children: [/* @__PURE__ */ a(u, {
      name: d.basic,
      children: e.value.propertyView({
        label: t("jsonLottie.lottieJson")
      })
    }), (n(o).editorModeStatus === "logic" || n(o).editorModeStatus === "both") && /* @__PURE__ */ a(r, {
      children: /* @__PURE__ */ p(u, {
        name: d.interaction,
        children: [e.speed.propertyView({
          label: t("jsonLottie.speed")
        }), e.loop.propertyView({
          label: t("jsonLottie.loop")
        }), e.animationStart.propertyView({
          label: t("jsonLottie.animationStart")
        }), e.keepLastFrame.propertyView({
          label: t("jsonLottie.keepLastFrame")
        }), L(e)]
      })
    }), (n(o).editorModeStatus === "layout" || n(o).editorModeStatus === "both") && /* @__PURE__ */ a(r, {
      children: /* @__PURE__ */ a(u, {
        name: d.style,
        children: e.container.getPropertyView()
      })
    })]
  })).build();
}();
b = class extends b {
  autoHeight() {
    return !1;
  }
};
const M = x(b, [new w("value", t("jsonLottie.valueDesc")), f]);
export {
  M as JsonLottieComp
};
