2025-01-15 22:16:27 +03:00
|
|
|
'use client';
|
|
|
|
|
2025-02-19 23:30:35 +03:00
|
|
|
import { InfoConstituenta } from '@/features/rsform/components/InfoConstituenta';
|
2025-02-12 21:36:25 +03:00
|
|
|
|
2025-02-10 01:32:55 +03:00
|
|
|
import { Tooltip } from '@/components/Container';
|
|
|
|
import { Loader } from '@/components/Loader';
|
2025-01-15 22:16:27 +03:00
|
|
|
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>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|