"use client";

import { OpenButton } from "(dispatch)/_components/pannel/OpenButton";
import { Pannel } from "(dispatch)/_components/pannel/Pannel";
import { usePannelStore } from "_store/pannelStore";
import { cn } from "helpers/cn";
import dynamic from "next/dynamic";
const Map = dynamic(() => import("./_components/map/Map"), { ssr: false });

export default () => {
	const { isOpen } = usePannelStore();
	return (
		<div
			className={cn(
				"relative flex-1 flex transition-all duration-500 ease",
				!isOpen && "w-[calc(100%+200px)]",
				isOpen && "w-[100%]",
			)}
		>
			{/* <MapToastCard2 /> */}
			<Map>
				<OpenButton />
			</Map>
			<Pannel />
		</div>
	);
};
