import { aX as x, aW as e, s as u, ac as f, b7 as p } from "./index-6jcTChn4.js";
import { useState as h } from "react";
const g = ({ eventType: n, disabled: o }) => {
  const { t: d } = x(), [t, i] = h(""), c = t !== "" ? `?${t}` : "", s = n.URL + c;
  function r({ size: a, data: m }) {
    const l = `https://api.qrserver.com/v1/create-qr-code/?size=${a}&data=${m}`;
    return /* @__PURE__ */ e.jsx(f, { content: s, children: /* @__PURE__ */ e.jsx("a", { download: !0, href: l, target: "_blank", rel: "noreferrer", children: /* @__PURE__ */ e.jsx(
      "img",
      {
        className: p(
          "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: s
      }
    ) }) });
  }
  return /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-5 text-sm", children: [
    /* @__PURE__ */ e.jsx("div", { className: "flex w-full", children: /* @__PURE__ */ e.jsx(
      u,
      {
        name: "hello",
        disabled: o,
        value: t,
        onChange: (a) => i(a.target.value),
        label: d("additional_url_parameters"),
        containerClassName: "w-full"
      }
    ) }),
    /* @__PURE__ */ e.jsxs("div", { className: "max-w-60 flex items-baseline gap-2", children: [
      /* @__PURE__ */ e.jsx(r, { size: 256, data: s }),
      /* @__PURE__ */ e.jsx(r, { size: 128, data: s }),
      /* @__PURE__ */ e.jsx(r, { size: 64, data: s })
    ] })
  ] });
};
export {
  g as default
};
