import ArrowLeftD from '@/components/icons/ArrowLeftD'
import ClockTurn from '@/components/icons/ClockTurn'
import GreenCalendarTurn from '@/components/icons/GreenCalendarTurn'
import LocationTurn from '@/components/icons/LocationTurn'
import { Button } from '@mui/material'
import React from 'react'

function ItemAppointment({ turn }) {
    return (
        <li
            key={turn.id}
            className='py-4 w-full px-6 bg-[#FFF] border border-solid border-[#EFEFEF] rounded-lg'
        >
            <p className='text-[#3B3B3B] text-[20px] font-bold'>نوبت دهی</p>
            <div className='flex flex-col items-start justify-center mt-6 gap-6'>
                <div className='flex items-center justify-start gap-1'>
                    <LocationTurn />
                    <p className='text-[#525252] text-[14px] font-normal'>آدرس: {turn.location}</p>
                </div>
                <div className='flex items-center justify-start gap-1'>
                    <ClockTurn />
                    <p className='text-[#525252] text-[14px] font-normal'>ساعت کاری: {turn.hours_of_work}</p>
                </div>
            </div>
            <div className='flex mt-6 items-center justify-between'>
                <div className='flex items-center justify-start gap-1'>
                    <GreenCalendarTurn />
                    <p className='text-[#05BA58] text-[12px] font-medium'>اولین نوبت آزاد: {turn.first_free_turn}</p>
                </div>
                <Button
                    variant='contained'
                    className='!py-2 !px-6 gap-1'
                >
                    دریافت نوبت
                    <ArrowLeftD />
                </Button>
            </div>
        </li>
    )
}

export default ItemAppointment