import ChartPieIcon from "@icons/ChartPieIcon";
import ContactBookIcon from "@icons/ContactBookIcon";
import FlowArrowIcon from "@icons/FlowArrowIcon";
import LayoutIcon from "@icons/LayoutIcon";
import MegaphoneIcon from "@icons/MegaphoneIcon";
import QuestionIcon from "@icons/QuestionIcon";
import QuestionsMapIcon from "@icons/QuestionsMapIcon";


export const quizSetupSteps = [
    { stepperText: "Настройка стартовой страницы", sidebarText: "Стартовая страница", sidebarIcon: LayoutIcon },
    { stepperText: "Задайте вопросы", sidebarText: "Вопросы", sidebarIcon: QuestionIcon },
    { stepperText: "Настройте авторезультаты", sidebarText: "Результаты", sidebarIcon: ChartPieIcon },
    // { stepperText: "Оценка графа карты вопросов", sidebarText: "Карта вопросов", sidebarIcon: QuestionsMapIcon },
    { stepperText: "Настройте форму контактов", sidebarText: "Форма контактов", sidebarIcon: ContactBookIcon },
    { stepperText: "Установите квиз", sidebarText: "Установка квиза", sidebarIcon: FlowArrowIcon },
    { stepperText: "Запустите рекламу", sidebarText: "Запуск рекламы", sidebarIcon: MegaphoneIcon },
] as const;

export const maxQuizSetupSteps = quizSetupSteps.length;

export type QuizStartpageType = "standard" | "expanded" | "centered" | null;

export type QuizStartpageAlignType = "left" | "right" | "center";

export type QuizType = "quiz" | "form" | null;

export type QuizResultsType = true | null;

export interface QuizConfig {
    type: QuizType;
    logo: string | null;
    noStartPage: boolean;
    startpageType: QuizStartpageType;
    results: QuizResultsType;
    haveRoot: boolean;
    startpage: {
        description: string;
        button: string;
        position: QuizStartpageAlignType;
        background: {
            type: null | "image" | "video";
            desktop: string | null;
            mobile: string | null;
            video: string | null;
            cycle: boolean;
        };
    };
    info: {
        phonenumber: string;
        clickable: boolean;
        orgname: string;
        site: string;
        law?: string;
    };
    meta: string;
}

export const defaultQuizConfig: QuizConfig = {
    type: null,
    logo: null,
    noStartPage: false,
    startpageType: null,
    results: null,
    haveRoot: false,
    startpage: {
        description: "",
        button: "",
        position: "left",
        background: {
            type: null,
            desktop: null,
            mobile: null,
            video: null,
            cycle: false,
        },
    },
    info: {
        phonenumber: "",
        clickable: false,
        orgname: "",
        site: "",
        law: "",
    },
    meta: "",
};
