import { Button } from "@/components/ui/button";
import axios from "axios";

import { toast } from "sonner";

export default function ManualTrigger() {
    const rfidReaderTrigger = async () => {
        try {
            const res = await axios.post("/api/rfid/manualtrigger/wrapper1");

            if (res.data.success) {
                toast.success(res.data.message);

                return;
            }

            if (!res.data.success) {
                toast.error(res.data.message);
            }
        } catch (error) {
            console.log(error);

            //stoast.success(error.data.message);
        }
    };
    return (
        <div>
            <Button onClick={rfidReaderTrigger}>Wrapper 1 RFID</Button>
        </div>
    );
}
