'use client'
import SectionHeader from '@/components/SectionHeader'
import ServiceItem from '@/components/ServiceItem'
import { clx } from '@/helpers/utils'
import { FC, useState } from 'react'
import { Swiper, SwiperSlide } from 'swiper/react'

const DanakServices: FC = () => {

    const [categoryId, setCategoryId] = useState<string>('')

    return (
        <div className='xl:mt-24 mt-12 max-w-maxWidth mx-auto'>
            <SectionHeader
                title='سرویس های داناک'
            />

            <div className='mt-6'>
                <Swiper
                    className='w-full'
                    spaceBetween={15}
                    slidesPerView='auto'
                >
                    <SwiperSlide className='max-w-[158px]'>
                        <div onClick={() => setCategoryId('')} className={clx(
                            'h-10 cursor-pointer rounded-full border-2 border-white bg-white/45 flex gap-2 justify-center items-center',
                            '' === categoryId && 'bg-white'
                        )}>
                            <div className='text-sm'>
                                همه
                            </div>
                        </div>
                    </SwiperSlide>
                    <SwiperSlide className='max-w-[158px]'>
                        <div onClick={() => setCategoryId('1')} className={clx(
                            'h-10 cursor-pointer rounded-full border-2 border-white bg-white/45 flex gap-2 justify-center items-center',
                            '1' === categoryId && 'bg-white'
                        )}>
                            <div className='size-5 rounded-full bg-blue-100'>

                            </div>
                            <div className='text-sm'>
                                ابزارهای کاربردی
                            </div>
                        </div>
                    </SwiperSlide>

                </Swiper>
            </div>

            <div className='xl:mt-16 mt-10 flex flex-wrap gap-8'>
                <div className='xl:min-w-[30%] min-w-[70%] flex-1'>
                    <ServiceItem
                        isShort
                    />
                </div>
                <div className='xl:min-w-[30%] min-w-[70%] flex-1'>
                    <ServiceItem
                        isShort
                    />
                </div>
                <div className='xl:min-w-[30%] min-w-[70%] flex-1'>
                    <ServiceItem
                        isShort
                    />
                </div>
            </div>
        </div>
    )
}

export default DanakServices