<?php

namespace App\Services;

use Illuminate\Support\Facades\File;

class ThemeService
{
    protected $theme;

    public function __construct()
    {
        $this->theme = setting('site_theme', config('app.theme', 'tailwind'));
    }

    public function getActiveTheme()
    {
        return $this->theme;
    }

    public function getThemePath()
    {
        return resource_path('themes/' . $this->theme);
    }

    public function getViewPath()
    {
        return $this->getThemePath() . '/views';
    }

    public function getAssetPath($path = '')
    {
        return asset('assets/themes/' . $this->theme . '/' . $path);
    }
}
