import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Play, X, ArrowRight, Check } from "lucide-react";
export function getPreviewTourSteps({ editContext, nextStep, stopTour, waitForElement, delay, }) {
    const tourSteps = {
        "start-tour": {
            title: "Welcome to the Preview Tour!",
            description: "I'll guide you through the preview and explain how to use its essential features.",
            prepareAction: async () => {
                editContext?.openSplashScreen();
            },
            buttons: [
                {
                    label: (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Play, { className: "h-4 w-4" }), " Start Tour"] })),
                    onClick: () => {
                        nextStep("comment");
                    },
                    className: "button button-primary mt-2",
                },
                {
                    label: (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(X, { className: "h-4 w-4" }), " No thanks"] })),
                    onClick: () => {
                        stopTour();
                    },
                    className: "button button-secondary mt-2",
                },
            ],
        },
        comment: {
            description: _jsx(_Fragment, { children: "Click here to add a comment to the page" }),
            focusElement: "#add-comment",
            nextStep: "commentContextMenu",
            buttons: [
                {
                    label: (_jsxs(_Fragment, { children: [_jsx(ArrowRight, { className: "inline h-4 w-4" }), " Next"] })),
                    onClick: () => nextStep("commentContextMenu"),
                },
            ],
        },
        commentContextMenu: {
            description: (_jsx(_Fragment, { children: "You can also select text and add a comment from the context menu " })),
            focusElement: "[data-testid='pageEditoriframe']",
            waitForUserInput: async () => {
                await waitForElement(".p-contextmenu-enter-done");
                await delay(1000);
            },
            nextStep: "approveMenu",
            bubblePosition: "left",
        },
        approveMenu: {
            description: _jsx(_Fragment, { children: "Approve or reject the page here " }),
            focusElement: "#actions-menu",
            waitForUserInput: async () => {
                await waitForElement("#approveReview");
                await delay(2000);
            },
            nextStep: "closeTour",
            bubblePosition: "left",
        },
        closeTour: {
            description: _jsx(_Fragment, { children: "Congratulations! You have completed the tour." }),
            buttons: [
                {
                    label: (_jsxs(_Fragment, { children: [_jsx(Check, { className: "inline h-4 w-4" }), " Finish Tour"] })),
                    onClick: () => stopTour(),
                    className: "button button-primary mt-2",
                },
            ],
        },
        congratulations: {
            title: "Congratulations!",
            description: "You have completed the tour and are ready to start editing!",
            buttons: [
                {
                    label: (_jsxs(_Fragment, { children: [_jsx(Check, { className: "inline h-4 w-4" }), " Finish Tour"] })),
                    onClick: () => stopTour(),
                    className: "button button-primary mt-2",
                },
            ],
        },
        error: {
            title: "Oh no...",
            description: "Something went wrong.",
            buttons: [
                {
                    label: (_jsxs(_Fragment, { children: [_jsx(Check, { className: "inline h-4 w-4" }), " Close"] })),
                    onClick: () => stopTour(),
                },
            ],
        },
    };
    return tourSteps;
}
//# sourceMappingURL=preview-tour.js.map