import { dataHook } from "./../wix-rich-content-common/index.js";
import { ADD_CAPTION_BUTTON, CAPTION } from "./data-hooks.js";
const createFigureTestkit = (getBase, index) => {
  return {
    caption: {
      click: async () => {
        const captions = await getBase().$$(dataHook(CAPTION));
        const caption = captions.at(index);
        await caption.click();
      }
    },
    addCaptionButton: {
      click: async () => {
        const addCaptionButtons = await getBase().$$(dataHook(ADD_CAPTION_BUTTON));
        const addCaptionButton = addCaptionButtons.at(index);
        await addCaptionButton.click();
      },
      exists: async () => {
        const addCaptionButtons = await getBase().$$(dataHook(ADD_CAPTION_BUTTON));
        const addCaptionButton = addCaptionButtons.at(index);
        return addCaptionButton.exists();
      }
    }
  };
};
export {
  createFigureTestkit
};
//# sourceMappingURL=testkit.js.map
