import { useState } from 'react';
import { motion } from 'framer-motion';
import NavBody from "./NavBody"
import NavFooter from "./NavFooter"
import vidoBg from "../assets/vido-bg.mp4"
import { IoMdPlayCircle } from "react-icons/io";

const links = [
    {
        title: "Home",
        href: "/"
    },
    {
        title: "Work",
        href: "/"
    },
    {
        title: "Services & Models",
        href: "/"
    },
    {
        title: "About",
        href: "/"
  
    },
    {
      title: "Contact",
      href: "/"
    }
]

const Navbar = () => {
    const [selectedLink, setSelectedLink] = useState({isActive: false, index: 0});
    const transition = {duration: 1, ease: [0.76, 0, 0.24, 1]}
    const height = {
        initial: {
            height: 0
        },
        enter: {
            height: "auto",
            transition
        },
            exit: {
            height: 0,
            transition
        }
    }

  return (
    <motion.div variants={height} initial="initial" animate="enter" exit="exit" className="overflow-hidden bg-[#FF5F38] flex flex-col">
        <div className="px-14 grid grid-cols-2">
            <div className='flex flex-col w-[430px]'>
                <video src={vidoBg} autoPlay loop muted className="video-container w-[450px] h-[280px] object-cover rounded-md my-2"></video>
                <div className='flex justify-between mt-2'>
                    <p className='flex gap-2 items-center text-xl cursor-pointer'><IoMdPlayCircle className='text-2xl'/> <span className='btn'>Play reel</span></p>
                    <p className='text-xl'>-01:18</p>
                </div>
            </div>
            <div>
                <NavBody links={links} selectedLink={selectedLink} setSelectedLink={setSelectedLink}/>
            </div>
        </div>
        <NavFooter/>
    </motion.div>
  )
}

export default Navbar