'use client';
import MapFullScreenButton from '@/components/shared/map/map-fullscreen-btn';
import MapWrapper from '@/components/shared/map/map-wrapper';
import { TopicsEnum } from '@/config/enums';
import { api } from '@/lib/trpc/client';

export default function ProjectMap() {
  const { data = [] } = api.posts.getGeolocations.useQuery({
    topic: TopicsEnum.PROJECT
  });

  return (
    <div className='size-full shrink-0'>
      <p className='mb-2 text-sm font-medium text-neutral-800 uppercase'>
        Kort
      </p>
      <div className='size-full border'>
        <MapWrapper data={data} />
      </div>
      <MapFullScreenButton />
    </div>
  );
}
