"use client";
import { usePannelStore } from "_store/pannelStore";
import { cn } from "helpers/cn";

export const OpenButton = () => {
	const { setOpen, isOpen } = usePannelStore();
	return (
		<button
			onClick={() => {
				setOpen(true);
			}}
			className={cn(
				"btn rounded-r-none absolute inset-y-2.5 right-0 z-999999 transition-all duration-500 ease",
				isOpen && "transform translate-x-full",
			)}
		>
			Open
		</button>
	);
};
