<?php

namespace Database\Seeders;

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

class PermissionParametersSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {

        // Service Params Permissions
        // section: page, document, input, output
        // document: ID, Passport, Birth ...
        // Basic Search Parameters
        /*Permission::create(['name' => 'Basics Search', 'permission_type'=>'Contract', 'section'=>'page', 'description'=>'User can perform a basic search option']);
        // ID card data
        Permission::create(['name' => 'ID', 'permission_type'=>'Contract', 'section'=>'document', 'description'=>'User can perform a basic search option using ID Card']);
        // input parameters
        Permission::create(['name' => 'Search with Serial number', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'ID', 'description'=>'Search using ID card Serial number']);
        Permission::create(['name' => 'Search with Surname', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'ID', 'description'=>'Search using ID card Surname']);
        Permission::create(['name' => 'Search with First name', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'ID', 'description'=>'Search using ID card First name']);
        Permission::create(['name' => 'Search with Other name', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'ID', 'description'=>'Search using ID card Other name']);
        Permission::create(['name' => 'Search with ID number', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'ID', 'description'=>'Search using ID card ID number']);
        Permission::create(['name' => 'Search with PIN', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'ID', 'description'=>'Search using ID card PIN']);
        Permission::create(['name' => 'Search with Citizenship', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'ID', 'description'=>'Search using ID card Citizenship']);
        Permission::create(['name' => 'Search with Gender', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'ID', 'description'=>'Search using ID card Gender']);
        // output parameters
        Permission::create(['name' => 'View Place of Birth', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Place of Birth']);
        Permission::create(['name' => 'View Place of Residence', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Place of Residence']);
        Permission::create(['name' => 'View Ethic group', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Ethic group']);
        Permission::create(['name' => 'View Family', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Family']);
        Permission::create(['name' => 'View Clan', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Clan']);
        Permission::create(['name' => 'View Occupation', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Occupation']);
        Permission::create(['name' => 'View Family relations', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Family relations']);
        Permission::create(['name' => 'View Photo and Signature', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Photo and Signature']);
        Permission::create(['name' => 'View Document History', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Document History']);

        // for passport data ...
        Permission::create(['name' => 'Advanced Search', 'permission_type'=>'Contract', 'section'=>'page', 'description'=>'User can perform a advanced search option']);
        // ID card data
        Permission::create(['name' => 'Passport', 'permission_type'=>'Contract', 'section'=>'document', 'description'=>'User can perform a advanced search option using Passport data']);
        Permission::create(['name' => 'Search with Passport number', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'Passport', 'description'=>'Search using Passport data Passport number']);
        Permission::create(['name' => 'Search with Passport ID number', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'Passport', 'description'=>'Search using Passport data Passport ID number']);
        Permission::create(['name' => 'Search with Date of Issue', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'Passport', 'description'=>'Search using Passport data Date of Issue']);
        Permission::create(['name' => 'Search with Date of Expire', 'permission_type'=>'Contract', 'section'=>'input', 'document'=>'Passport', 'description'=>'Search using Passport data Date of Expire']);*/

        // output parameters
        Permission::create(['name' => 'View Place of Birth', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Place of Birth']);
        Permission::create(['name' => 'View Place of Residence', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Place of Residence']);
        Permission::create(['name' => 'View Ethic group', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Ethic group']);
        Permission::create(['name' => 'View Family', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Family']);
        Permission::create(['name' => 'View Clan', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Clan']);
        Permission::create(['name' => 'View Occupation', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Occupation']);
        Permission::create(['name' => 'View Family relations', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Family relations']);
        Permission::create(['name' => 'View Photo and Signature', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Photo and Signature']);
        Permission::create(['name' => 'View Document History', 'permission_type'=>'Contract', 'section'=>'output', 'document'=>'ID', 'description'=>'View ID card Document History']);
    }
}
