import { type FC } from "react";
import { CloseCircle } from "iconsax-react";
import Button from "@/components/Button";
import { t } from "@/locale";

export type TicketDetailActionsProps = {
    onScrollToReply: () => void;
    onCloseTicket: () => void;
};

const TicketDetailActions: FC<TicketDetailActionsProps> = ({
    onScrollToReply,
    onCloseTicket,
}) => (
    <div className="bg-white xl:p-6 p-4 rounded-3xl flex gap-4">
        <Button
            label={t("ticket.send_answer")}
            className="text-xs xl:h-10 h-8"
            onClick={onScrollToReply}
        />
        <Button
            className="bg-[#D52903] xl:h-10 h-8"
            onClick={onCloseTicket}
        >
            <div className="flex gap-2 text-xs items-center text-white">
                <CloseCircle color="white" size={20} />
                <span>{t("ticket.close_ticket")}</span>
            </div>
        </Button>
    </div>
);

export default TicketDetailActions;
