import clsx from 'clsx'; import { Plus, Minus } from 'lucide-react'; import { useCallback } from 'react'; import loaderStore from '/src/utils/hooks/loader/useLoaderStore'; import { useOptions } from '/src/utils/optionsContext'; const Zoom = () => { const { tabs, zoomLevels, setZoom, resetZoom } = loaderStore(); const activeFrameRef = loaderStore((state) => state.activeFrameRef); const { options } = useOptions(); const actab = tabs.find((tab) => tab.active); const currentz = actab ? zoomLevels[actab.id] || 100 : 100; const isNewTab = actab?.url === 'tabs://new'; const canZoom = actab && !isNewTab && activeFrameRef?.current; const zIn = useCallback(() => { canZoom && currentz < 200 && setZoom(actab.id, Math.min(currentz + 10, 200), activeFrameRef); }, [canZoom, actab, currentz, setZoom, activeFrameRef]); const zout = useCallback(() => { canZoom && currentz > 50 && setZoom(actab.id, Math.max(currentz - 10, 50), activeFrameRef); }, [canZoom, actab, currentz, setZoom, activeFrameRef]); const ressetLvl = useCallback(() => { canZoom && resetZoom(actab.id, activeFrameRef); }, [canZoom, actab, resetZoom, activeFrameRef]); return (