import { dataHook } from "./../wix-rich-content-common/index.js";
import {
  FULLSCREEN_CLOSE_BUTTON,
  FULLSCREEN_ROOT,
  FULLSCREEN_TOGGLE_BUTTON
} from "./modals/fullscreen/data-hooks.js";
const createViewerBaseTestkit = ({ getBase }) => {
  const getFullscreen = () => getBase().get(dataHook(FULLSCREEN_ROOT));
  const getCloseButton = async () => (await getFullscreen()).get(dataHook(FULLSCREEN_CLOSE_BUTTON));
  const getToggleButton = async () => getBase().get(dataHook(FULLSCREEN_TOGGLE_BUTTON));
  return {
    fullscreen: {
      exists: async () => getFullscreen().then(
        () => true,
        () => false
      ),
      container: async () => getFullscreen(),
      closeButton: {
        exists: () => getCloseButton().then(
          () => true,
          () => false
        ),
        click: async () => getCloseButton().then((button) => button.click()),
        getNative: async () => {
          const closeButton = await getCloseButton();
          return closeButton.getNative();
        }
      },
      toggleButton: {
        exists: async () => getToggleButton().then(
          () => true,
          () => false
        ),
        click: async () => getToggleButton().then((button) => button.click())
      }
    }
  };
};
export {
  createViewerBaseTestkit
};
//# sourceMappingURL=testkit.js.map
