<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
class RolesSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $soporte = Role::create([
            'name' => 'Soporte',
            'guard_name' => 'web',
        ]);
        $superAdmin = Role::create([
            'name' => 'Super Admin',
            'guard_name' => 'web',
        ]);
        $administrator = Role::create([
            'name' => 'Administrador',
            'guard_name' => 'web',
        ]);
        $human_resources = Role::create([
            'name' => 'Recursos Humanos',
            'guard_name' => 'web',
        ]);
        $assistant = Role::create([
            'name' => 'Asistente Administrativo',
            'guard_name' => 'web',
        ]);
        $employee = Role::create([
            'name' => 'Empleado',
            'guard_name' => 'web',
        ]);
        Permission::create([
            'name' => 'Dashboard',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator, $human_resources, $assistant, $employee]);
        Permission::create([
            'name' => 'User_profile',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator, $human_resources, $employee]);
        Permission::create([
            'name' => 'User_profile_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator, $human_resources, $employee]);
        Permission::create([
            'name' => 'Settings_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Settings_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'User_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'User_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'User_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'User_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Role_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Role_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Role_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Role_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Permission_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Permission_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Permission_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Permission_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Assign_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Assign_sync_all',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Assign_revoke_all',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Assign_toggle_permission',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Administration_menu',
            'guard_name' => 'web',
        ])->syncRoles([$soporte,$superAdmin]);
        Permission::create([
            'name' => 'Users_menu',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Companies_menu',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Contract_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Contract_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Contract_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Contract_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Annex_others_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Annex_others_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Annex_others_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Annex_others_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte]);
        Permission::create([
            'name' => 'Companies_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Companies_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Companies_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Companies_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Companies_add_users',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator]);
        Permission::create([
            'name' => 'Companies_remove_users',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator]);
        Permission::create([
            'name' => 'Eps_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Eps_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Eps_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Eps_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Plan_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Plan_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Plan_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Plan_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Type_work_permit_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Type_work_permit_create',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Type_work_permit_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Type_work_permit_delete',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin]);
        Permission::create([
            'name' => 'Company_register_users_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_administrator_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator]);
        Permission::create([
            'name' => 'Company_administrator_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator]);
        Permission::create([
            'name' => 'Company_administrator_delete',
            'guard_name' => 'web',
        ])->syncRoles([$administrator]);
        Permission::create([
            'name' => 'Company_administrative_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_administrative_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_administrative_delete',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_send_email_info_account',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employees_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_employee_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_employee_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_delete',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employees_import',
            'guard_name' => 'web',
        ])->syncRoles([$administrator]);
        Permission::create([
            'name' => 'Company_employee_profile_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_profile_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'CvEmployee_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator, $human_resources]);
        Permission::create([
            'name' => 'CvEmployee_detail_index',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator, $human_resources, $employee]);
        Permission::create([
            'name' => 'CvEmployee_detail_update',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator , $human_resources, $employee]);
        Permission::create([
            'name' => 'CvEmployee_pdf',
            'guard_name' => 'web',
        ])->syncRoles([$soporte, $superAdmin, $administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_contracts_users_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_contracts_users_history',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_contracts_users_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_contracts_users_terminate',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_contracts_users_annex_view',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_contracts_users_annex_add',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_contracts_users_status_approve',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_contracts_users_add_signature',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_contracts_active_employee_signature',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_contracts_users_profile_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'ContractEmployee_pdf',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $employee]);
        Permission::create([
            'name' => 'AnnexContractEmployee_pdf',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_configuration_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator]);
        Permission::create([
            'name' => 'Company_configuration_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator]);
        Permission::create([
            'name' => 'Company_configuration_add_signature',
            'guard_name' => 'web',
        ])->syncRoles([$administrator]);
        Permission::create([
            'name' => 'Company_job_positions_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_job_positions_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_job_positions_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_job_positions_delete',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_add_job_position_administrative',
            'guard_name' => 'web',
        ])->syncRoles([$administrator]);
        Permission::create([
            'name' => 'Company_type_psychotechnics_test_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_type_psychotechnics_test_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_type_psychotechnics_test_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_type_psychotechnics_test_delete',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_payment_voucher_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_payment_voucher_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_payment_voucher_view',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_payment_voucher_delete',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_psychotechnics_test_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_psychotechnics_test_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_psychotechnics_test_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_employee_psychotechnics_test_delete',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_document_type_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_document_type_create',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_document_type_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_document_type_delete',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_user_document_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_user_document_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_work_permit_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_work_permit_view',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_work_permit_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources]);
        Permission::create([
            'name' => 'Company_work_certificate_index',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_work_certificate_view',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_work_certificate_update',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_work_certificate_download',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Company_reports_employees',
            'guard_name' => 'web',
        ])->syncRoles([$administrator, $human_resources, $assistant]);
        Permission::create([
            'name' => 'Employee_menu',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_profile_index',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_index',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_contracts_index',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_annex_others_index',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_work_permits_index',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_work_certificates_index',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_work_certificates_download',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_documents_index',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
        Permission::create([
            'name' => 'Employee_payment_voucher_index',
            'guard_name' => 'web',
        ])->syncRoles([$employee]);
    }
}
