<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;

class PermissionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        // Create permissions
        Permission::create(['name' => 'view dashboard']);
        Permission::create(['name' => 'manage users']);
        Permission::create(['name' => 'manage roles']);
        Permission::create(['name' => 'manage permissions']);
        Permission::create(['name' => 'manage posts']);
        Permission::create(['name' => 'manage comments']);
        Permission::create(['name' => 'manage categories']);
        Permission::create(['name' => 'manage tags']);
        Permission::create(['name' => 'manage settings']);
        Permission::create(['name' => 'manage messages']);
        Permission::create(['name' => 'manage services']);
        Permission::create(['name' => 'manage banners']);
        Permission::create(['name' => 'manage newsletters']);
        Permission::create(['name' => 'manage subscriptions']);
        Permission::create(['name' => 'manage orders']);
        Permission::create(['name' => 'manage products']);
        Permission::create(['name' => 'manage reviews']);
        Permission::create(['name' => 'manage shipping']);
        Permission::create(['name' => 'manage payments']);
        Permission::create(['name' => 'manage promotions']);
        Permission::create(['name' => 'manage reports']);
        Permission::create(['name' => 'manage analytics']);
        Permission::create(['name' => 'manage notifications']);
        Permission::create(['name' => 'manage support']);
        Permission::create(['name' => 'manage transactions']);

        // Create permissions for frontend
        Permission::create(['name' => 'view frontend']);
        Permission::create(['name' => 'manage frontend']);
        Permission::create(['name' => 'manage frontend categories']);
        Permission::create(['name' => 'manage frontend tags']);
        Permission::create(['name' => 'manage frontend posts']);
        Permission::create(['name' => 'manage frontend comments']);
        Permission::create(['name' => 'manage frontend users']);
        Permission::create(['name' => 'manage frontend roles']);
        Permission::create(['name' => 'manage frontend permissions']);
        Permission::create(['name' => 'manage frontend settings']);
        Permission::create(['name' => 'manage frontend messages']);
        Permission::create(['name' => 'manage frontend services']);
        Permission::create(['name' => 'manage frontend banners']);
        Permission::create(['name' => 'manage frontend newsletters']);
        Permission::create(['name' => 'manage frontend subscriptions']);
        Permission::create(['name' => 'manage frontend orders']);
        Permission::create(['name' => 'manage frontend products']);
        Permission::create(['name' => 'manage frontend reviews']);
        Permission::create(['name' => 'manage frontend shipping']);
        Permission::create(['name' => 'manage frontend payments']);
        Permission::create(['name' => 'manage frontend promotions']);
        Permission::create(['name' => 'manage frontend reports']);
        Permission::create(['name' => 'manage frontend analytics']);
        Permission::create(['name' => 'manage frontend notifications']);
        Permission::create(['name' => 'manage frontend support']);
        Permission::create(['name' => 'manage frontend transactions']);
    }
}
