import { j as e, z as t, a8 as i, T as o } from "./index-c65ca4a4.mjs";
import { F as m } from "./Form-f4ced0f0.mjs";
import { T as c } from "./TextArea-65b41e1e.mjs";
const p = ({ formState: r, updateForm: n, errors: a }) => /* @__PURE__ */ e.jsxs(
  m,
  {
    marginBottom: !1,
    marginTop: !0,
    children: [
      /* @__PURE__ */ e.jsxs("div", { children: [
        /* @__PURE__ */ e.jsx(t, { className: "mb-2 block text-2xs font-semibold uppercase tracking-wider", grey: !0, level: 6, children: "Preview" }),
        /* @__PURE__ */ e.jsxs("a", { className: "flex flex-col rounded-sm border border-grey-300 p-3", href: r.url, rel: "noopener noreferrer", target: "_blank", children: [
          /* @__PURE__ */ e.jsxs("div", { className: "mb-1 flex items-center gap-2", children: [
            /* @__PURE__ */ e.jsx(i, { ...r }),
            /* @__PURE__ */ e.jsx("span", { className: "line-clamp-1 font-medium", children: r.title })
          ] }),
          /* @__PURE__ */ e.jsx("span", { className: "line-clamp-1 text-xs leading-snug text-grey-700", children: r.url })
        ] })
      ] }),
      /* @__PURE__ */ e.jsx(
        o,
        {
          error: !!a.title,
          hint: a.title,
          title: "Title",
          value: r.title ?? "",
          onChange: (s) => n((l) => ({ ...l, title: s.target.value }))
        }
      ),
      /* @__PURE__ */ e.jsx(
        c,
        {
          clearBg: !0,
          rows: 3,
          title: "Reason for recommending (optional)",
          value: r.reason ?? "",
          onChange: (s) => n((l) => ({ ...l, reason: s.target.value }))
        }
      )
    ]
  }
);
export {
  p as R
};
//# sourceMappingURL=RecommendationReasonForm-b6fdb352.mjs.map
