'use client';

import { Reviews } from '@/app/api-utlities/@types';

import { Rating } from '@/shared/components/rating';
import { Card, CardContent } from '@/shared/shadcn-ui/card';

type ReviewProps = {
  review: Reviews[number];
};

export const Review = ({ review }: ReviewProps) => {
  return (
    <Card className='overflow-hidden transition-all hover:shadow-lg'>
      <CardContent className='p-6'>
        <div className='mb-4 flex'>
          <Rating rating={review.rating} />
        </div>
        <p className='mb-4 text-gray-600 italic'>"{review.review}"</p>
        <p className='font-semibold'>{review.fullname}</p>
      </CardContent>
    </Card>
  );
};
