'use client'
import React from "react";
import {faBrain, faTriangleExclamation} from "@fortawesome/free-solid-svg-icons";
import InputField from "@/components/form/InputField";
import ToggleWithConfirmation from "@/components/form/ToggleWithConfirmation";
import {useTranslations} from "next-intl";

interface AdvancedGenerationOptionsProps {
    useExplicit: boolean;
    setUseExplicit: (value: boolean) => void;
    useSmart: boolean;
    setUseSmart: (value: boolean) => void;
}

export default function AdvancedGenerationOptions({
    useExplicit,
    setUseExplicit,
    useSmart,
    setUseSmart
}: AdvancedGenerationOptionsProps) {
    const t = useTranslations();

    return (
        <div className="bg-secondary/20 rounded-xl p-5 shadow-inner border border-secondary/30">
            <div className="flex justify-evenly items-center">
                <InputField
                    icon={faTriangleExclamation}
                    fieldName={t("generationOptions.explicit.label")}
                    centered
                    input={
                        <ToggleWithConfirmation
                            checked={useExplicit}
                            onChange={setUseExplicit}
                            alertTitle={t("generationOptions.explicit.alertTitle")}
                            alertMessage={t("generationOptions.explicit.alertMessage")}
                            alertType="alert"
                            confirmText={t("generationOptions.activate")}
                            cancelText={t("generationOptions.cancel")}
                        />
                    }
                />
                <InputField
                    icon={faBrain}
                    fieldName={t("generationOptions.smart.label")}
                    centered
                    input={
                        <ToggleWithConfirmation
                            checked={useSmart}
                            onChange={setUseSmart}
                            alertTitle={t("generationOptions.smart.alertTitle")}
                            alertMessage={t("generationOptions.smart.alertMessage")}
                            alertType="informatif"
                            confirmText={t("generationOptions.activate")}
                            cancelText={t("generationOptions.cancel")}
                        />
                    }
                />
            </div>
        </div>
    );
}
