import path from 'path'
import { fileURLToPath } from 'url'

import tailwindcssDir from 'tailwindcss-dir'
import gradientMaskImage from 'tailwind-gradient-mask-image'
import scrollbar from 'tailwind-scrollbar'

const __filename = fileURLToPath(import.meta.url)
const __dirname  = path.dirname(__filename)

const r = (p) => path.join(__dirname, p).replace(/\\/g, '/')

/** @type {import('tailwindcss').Config} */
export default {
    darkMode: 'class',
    content: [
        r('./modules/**/*.blade.php'),
        r('./partials/**/*.blade.php'),
        r('./layouts/**/*.blade.php'),
        r('./widgets/**/*.blade.php'),
        r('./resources/**/*.{js,ts,vue}'),
    ],

    theme: {
        extend: {
            colors: {
                brand: { 500: '#007f3f' },
            },
            fontFamily: {
                sans: ['iransans', 'ui-sans-serif', 'system-ui'],
            },
            backgroundImage: {
                'eslimi-vertical': "url('/img/bg/intro-bg.svg')",
                'gradient-radial-to-bl':
                    'radial-gradient(70% 100% at 65% 0%, var(--tw-gradient-stops))',
                'icon-white': "url('/img/bg/smooth-corners-sqaure.svg')",
            },
        },
    },

    plugins: [
        tailwindcssDir(),
        gradientMaskImage,
        scrollbar({ nocompatible: true }),
    ],
}
