// src/relay/Feedback/FeedbackContainer.tsx
import { graphql, useLazyLoadQuery } from "@nova/react";
import { FeedbackComponent } from "./Feedback.mjs";
import * as React from "react";
import { ErrorBoundary } from "../../shared/ErrorBoundary.mjs";
var FeedbackContainerQuery = graphql`
  query FeedbackContainerQuery($id: ID!) {
    feedback(id: $id) {
      ...Feedback_feedbackFragment
    }
  }
`;
var FeedbackContainerInner = () => {
  const { data } = useLazyLoadQuery(FeedbackContainerQuery, {
    id: "42"
  });
  if (data) {
    return /* @__PURE__ */ React.createElement(FeedbackComponent, { feedback: data.feedback });
  } else {
    return /* @__PURE__ */ React.createElement("div", null, "No data");
  }
};
var FeedbackContainer = () => {
  return /* @__PURE__ */ React.createElement(
    ErrorBoundary,
    {
      fallback: /* @__PURE__ */ React.createElement("div", null, "There was an error"),
      onError: console.error
    },
    /* @__PURE__ */ React.createElement(React.Suspense, { fallback: /* @__PURE__ */ React.createElement("div", null, "Loading...") }, /* @__PURE__ */ React.createElement(FeedbackContainerInner, null))
  );
};
export {
  FeedbackContainer
};
