import React from "react";
import { PollData_Layout_PollLayout_Type } from "./../../../ricos-schema/legacy/wix/rich_content/v1/index.js";
import { withRCEHelpers } from "../rce-helpers-context/index.js";
import { PollGridOption } from "./poll-grid-option.js";
import { PollListOption } from "./poll-list-option.js";
import { PollGridOptionWebview } from "./webview/poll-grid-option-webview.js";
import { PollListOptionWebview } from "./webview/poll-list-option-webview.js";
import { OptionPropTypes } from "./types.js";
const PollOption = withRCEHelpers((props) => {
  const { layout, rce } = props;
  if (rce.isWebView) {
    switch (layout.poll?.type) {
      case PollData_Layout_PollLayout_Type.GRID:
        return /* @__PURE__ */ React.createElement(PollGridOptionWebview, { ...props });
      case PollData_Layout_PollLayout_Type.LIST:
      default:
        return /* @__PURE__ */ React.createElement(PollListOptionWebview, { ...props });
    }
  }
  switch (layout.poll?.type) {
    case PollData_Layout_PollLayout_Type.GRID:
      return /* @__PURE__ */ React.createElement(PollGridOption, { ...props });
    case PollData_Layout_PollLayout_Type.LIST:
    default:
      return /* @__PURE__ */ React.createElement(PollListOption, { ...props });
  }
});
export {
  OptionPropTypes,
  PollOption
};
//# sourceMappingURL=index.js.map
