2025-01-15 22:16:06 +03:00
|
|
|
'use client';
|
|
|
|
|
|
|
|
import InfoConstituenta from '@/components/info/InfoConstituenta';
|
2025-02-07 10:53:49 +03:00
|
|
|
import { Tooltip } from '@/components/ui/Container';
|
2025-01-15 22:16:06 +03:00
|
|
|
import Loader from '@/components/ui/Loader';
|
|
|
|
import { useTooltipsStore } from '@/stores/tooltips';
|
|
|
|
import { globals } from '@/utils/constants';
|
|
|
|
|
|
|
|
export const GlobalTooltips = () => {
|
|
|
|
const hoverCst = useTooltipsStore(state => state.activeCst);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Tooltip
|
|
|
|
float
|
|
|
|
id={globals.tooltip}
|
|
|
|
layer='z-topmost'
|
|
|
|
place='right-start'
|
|
|
|
className='mt-8 max-w-[20rem] break-words'
|
|
|
|
/>
|
|
|
|
<Tooltip
|
|
|
|
float
|
|
|
|
id={globals.value_tooltip}
|
|
|
|
layer='z-topmost'
|
|
|
|
className='max-w-[calc(min(40rem,100dvw-2rem))] text-justify'
|
|
|
|
/>
|
|
|
|
<Tooltip clickable id={globals.constituenta_tooltip} layer='z-modalTooltip' className='max-w-[30rem]'>
|
|
|
|
{hoverCst ? <InfoConstituenta data={hoverCst} onClick={event => event.stopPropagation()} /> : <Loader />}
|
|
|
|
</Tooltip>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|