<?php

namespace App\Http\Controllers\Admin\Settings;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class CustomCssController extends Controller
{
    public function index()
    {
        return view('admin.pages.settings.custom-css.index');
    }

    public function store(Request $request)
    {
        $validated = $request->validate([
            'custom_css' => 'required',
        ]);

        storeOption([
            'custom_css' => $validated['custom_css'],
        ]);

        return response()->json(['message' => __('Custom CSS updated successfully'), 'reload' => true]);
    }
}
