import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
import { Component } from "@contember/binding";
import { fieldViewDictionary } from "./fieldViewDictionary.js";
import { useMessageFormatter } from "../../../i18n/useMessageFormatter.js";
const FieldFallbackView = Component(
  (props) => {
    const formatMessage = useMessageFormatter(fieldViewDictionary);
    if (props.fallback !== void 0) {
      return /* @__PURE__ */ jsxDEV(Fragment, { children: props.fallback }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/fieldViews/FieldFallbackView.tsx",
        lineNumber: 23,
        columnNumber: 11
      }, globalThis);
    }
    switch (props.fallbackStyle) {
      case "nothing":
        return null;
      case "unknown":
        return /* @__PURE__ */ jsxDEV("i", { style: { opacity: 0.4, fontSize: "0.75em" }, children: formatMessage("fieldView.fallback.unknown") }, void 0, false, {
          fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/fieldViews/FieldFallbackView.tsx",
          lineNumber: 29,
          columnNumber: 12
        }, globalThis);
      case "n/a":
      default:
        return /* @__PURE__ */ jsxDEV("i", { style: { opacity: 0.4, fontSize: "0.75em" }, children: formatMessage("fieldView.fallback.notAvailable") }, void 0, false, {
          fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/fieldViews/FieldFallbackView.tsx",
          lineNumber: 32,
          columnNumber: 12
        }, globalThis);
    }
  },
  (props) => /* @__PURE__ */ jsxDEV(Fragment, { children: props.fallback }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/fieldViews/FieldFallbackView.tsx",
    lineNumber: 35,
    columnNumber: 11
  }, globalThis),
  "FieldFallbackView"
);
export {
  FieldFallbackView
};
//# sourceMappingURL=FieldFallbackView.js.map
