import { jsxs as o, jsx as e } from "react/jsx-runtime";
import { useState as f } from "react";
import { y as p, k as h, Y as v, Z as x } from "./index-ykl8OQ78.js";
const N = ({ eventType: n, disabled: d }) => {
  const { t: i } = p(), [r, c] = f(""), m = r !== "" ? `?${r}` : "", t = n.URL + m;
  function s({ size: a, data: u }) {
    const l = `https://api.qrserver.com/v1/create-qr-code/?size=${a}&data=${u}`;
    return /* @__PURE__ */ e(v, { content: t, children: /* @__PURE__ */ e("a", { download: !0, href: l, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e(
      "img",
      {
        className: x(
          "hover:bg-muted border-default border transition hover:shadow-sm",
          a >= 256 && "min-h-32"
        ),
        style: { padding: a / 16, borderRadius: a / 20 },
        width: a,
        src: l,
        alt: t
      }
    ) }) });
  }
  return /* @__PURE__ */ o("div", { className: "flex w-full flex-col gap-5 text-sm", children: [
    /* @__PURE__ */ e("div", { className: "flex w-full", children: /* @__PURE__ */ e(
      h,
      {
        name: "hello",
        disabled: d,
        value: r,
        onChange: (a) => c(a.target.value),
        label: i("additional_url_parameters"),
        containerClassName: "w-full"
      }
    ) }),
    /* @__PURE__ */ o("div", { className: "max-w-60 flex items-baseline gap-2", children: [
      /* @__PURE__ */ e(s, { size: 256, data: t }),
      /* @__PURE__ */ e(s, { size: 128, data: t }),
      /* @__PURE__ */ e(s, { size: 64, data: t })
    ] })
  ] });
};
export {
  N as default
};
