'use client'
import { Card, CardBody, CardFooter, Image, Tab, Tabs } from '@nextui-org/react'
import Link from 'next/link';
import React from 'react'

export default function Headline() {

    const headlineData = [
        {
            id: 1,
            date: '03/02/2024 15:45 WIB',
            title: 'MNC Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03',
            imageUrl: '/headline1.png',
            link: '/link2',
        },
        {
            id: 2,
            date: '03/02/2024 15:45 WIB',
            title: 'MNC Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03',
            imageUrl: '/headline2.png',
            link: '/link2',
        },
        {
            id: 3,
            date: '03/02/2024 15:45 WIB',
            title: 'MNC Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03',
            imageUrl: '/headline3.png',
            link: '/link2',
        },
        {
            id: 4,
            date: '03/02/2024 15:45 WIB',
            title: 'MNC Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03',
            imageUrl: '/headline4.png',
            link: '/link2',
        },
        {
            id: 5,
            date: '03/02/2024 15:45 WIB',
            title: 'MNC Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03',
            imageUrl: '/headline5.png',
            link: '/link2',
        },

    ];

    return (
        <div className='space-y-5 pt-10 pb-10 bg-[#F1F4FE]'>
            <div className='lg:mx-16 space-y-4'>
                <div className='text-3xl font-bold z-10 text-black'>Headline News</div>
                <div>
                    <div className="flex w-full flex-col">
                        <Tabs
                            aria-label="Options"
                            size='lg'
                            color='primary'
                            className='pb-5 pt-4'
                            radius='full'
                            disabledKeys={["audio", "foto", "teks"]}
                        >
                            <Tab key="audiovisual" title="Audio Visual">
                                <div className="gap-2 grid grid-cols-2 sm:grid-cols-5">
                                    {headlineData.map((item, index) => (
                                        <Card shadow="sm" key={index}>
                                            <CardBody className="overflow-visible p-0">
                                                <Image
                                                    shadow="sm"
                                                    radius="lg"
                                                    width="100%"
                                                    alt={item.title}
                                                    className="w-full object-cover "
                                                    src={item.imageUrl}
                                                />
                                            </CardBody>
                                            <CardFooter className="text-small text-left flex flex-col items-start">
                                                <div >{item.date}</div>
                                                <div className='font-bold'>{item.title}</div>
                                                <Link href={`/headline/detail/${item.id}`}>
                                                    <p className='font-semibold text-[#1A328E]'>Lihat Selengkapnya</p>
                                                </Link>
                                            </CardFooter>
                                        </Card>
                                    ))}
                                </div>
                            </Tab>
                            <Tab key="audio" title="Audio">
                                <div className='flex justify-center gap-4'>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className=' font-semibold text-[#1A328E] cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                </div>
                            </Tab>
                            <Tab key="foto" title="Foto">
                                <div className='flex justify-center gap-4'>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                </div>
                            </Tab>
                            <Tab key="teks" title="Teks">
                                <div className='flex justify-center gap-4'>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                    <Card className='max-h-max w-[250px] items-center rounded-lg'>
                                        <CardBody>
                                            <Image
                                                alt='visimisi'
                                                className='rounded-lg'
                                                src="/vm1.jpg"
                                                height={150}
                                                width={220}
                                            />
                                        </CardBody>
                                        <div className='px-3 pb-2'>
                                            <p className='text-xs '>03/01/2024 14:30 WIB</p>
                                            <p className='leading-tight text-sm font-semibold'>MNC  Penyelenggara Debat Capres, Timnas AMIN: Kita Tahu Ownernya Pendukung 03</p>
                                            <p className='text-xs text-blue-800 cursor-pointer'>Lihat Selengkanya</p>
                                        </div>
                                    </Card>
                                </div>
                            </Tab>
                        </Tabs>
                    </div>
                </div>
            </div>
        </div >
    )
}
