import { a4 as t, w as s, eg as g, aa as m, a5 as c, f4 as h, aG as v, V as S, U as L, H as a, ad as u, I as d, ae as o, af as n, am as i, ag as p, ah as x, aj as f, ai as w, ak as b } from "./56c67d3b.js";
import { lazy as C, useContext as l } from "react";
import { defaultLottie as j } from "./0a417d48.js";
import "react-dom";
const V = C(() => import("./e0100d10.js").then((r) => ({
  default: r.Player
}))), k = [{
  label: t("jsonLottie.auto"),
  value: "auto"
}, {
  label: t("jsonLottie.onHover"),
  value: "on hover"
}], F = [{
  label: t("jsonLottie.singlePlay"),
  value: "single"
}, {
  label: t("jsonLottie.endlessLoop"),
  value: "endless"
}], D = [{
  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 y = function() {
  const r = {
    value: s(g, JSON.stringify(j, null, 2)),
    speed: m(D, "1"),
    width: s(b, 100),
    height: s(b, 100),
    container: c(h, "container"),
    animationStyle: c(v, "animationStyle"),
    animationStart: m(k, "auto"),
    loop: m(F, "single"),
    keepLastFrame: S.DEFAULT_TRUE
  };
  return new L(r, (e) => /* @__PURE__ */ a("div", {
    style: {
      padding: `${e.container.margin}`,
      animation: e.animationStyle.animation,
      animationDelay: e.animationStyle.animationDelay,
      animationDuration: e.animationStyle.animationDuration,
      animationIterationCount: e.animationStyle.animationIterationCount
    },
    children: /* @__PURE__ */ a("div", {
      style: {
        height: "100%",
        display: "flex",
        justifyContent: "center",
        background: `${e.container.background}`,
        padding: `${e.container.padding}`,
        rotate: e.container.rotation
      },
      children: /* @__PURE__ */ a(V, {
        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__ */ u(d, {
    children: [/* @__PURE__ */ a(o, {
      name: n.basic,
      children: e.value.propertyView({
        label: t("jsonLottie.lottieJson")
      })
    }), (l(i).editorModeStatus === "logic" || l(i).editorModeStatus === "both") && /* @__PURE__ */ a(d, {
      children: /* @__PURE__ */ u(o, {
        name: n.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")
        }), p(e)]
      })
    }), (l(i).editorModeStatus === "layout" || l(i).editorModeStatus === "both") && /* @__PURE__ */ u(d, {
      children: [/* @__PURE__ */ a(o, {
        name: n.style,
        children: e.container.getPropertyView()
      }), /* @__PURE__ */ a(o, {
        name: n.animationStyle,
        hasTooltip: !0,
        children: e.animationStyle.getPropertyView()
      })]
    })]
  })).build();
}();
y = class extends y {
  autoHeight() {
    return !1;
  }
};
const J = x(y, [new f("value", t("jsonLottie.valueDesc")), w]);
export {
  J as JsonLottieComp
};
