import { jsx, jsxs, Fragment } from "react/jsx-runtime";
import { tcx } from "@choiceform/design-system";
import { observer, use$ as useSelector } from "../../_vendor/@legendapp/state/react.js";
import { t } from "../../i18n/index.js";
import { BlockWelcomeTv } from "./tv.js";
import { messageComputed$ } from "../../stores/message-store.js";
const BlockWelcome = observer(function BlockWelcome2(props) {
  const { className, children, ...rest } = props;
  const shouldShowWelcome = useSelector(messageComputed$.shouldShowWelcome);
  const welcomeTitle = t("conversation", "welcome-title");
  const welcomeDescription = t("conversation", "welcome-description");
  const tv = BlockWelcomeTv();
  if (!shouldShowWelcome) return null;
  return /* @__PURE__ */ jsx(
    "div",
    {
      className: tcx(tv.root(), className),
      ...rest,
      children: /* @__PURE__ */ jsx("div", { className: tv.container(), children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
        /* @__PURE__ */ jsx("h2", { className: tv.title(), children: welcomeTitle }),
        /* @__PURE__ */ jsx("p", { className: tv.description(), children: welcomeDescription })
      ] }) })
    }
  );
});
export {
  BlockWelcome
};
//# sourceMappingURL=block-welcome.js.map
