<?php

namespace App\Models\Registries;

class RegistryType {
    public const SIMPLE = 'simple';
    public const CATEGORIZED = 'categorized';
    public const RULESET = 'ruleset';
    public const LABORATORIES = 'laboratories';
    public const CERTIFIERS = 'certifiers';
    public const EXPERTS = 'experts';
    public const CERTIFICATES = 'certificates';
    public const COMPANIES = 'companies';
    public const DEVELOPMENTS = 'developments';
    public const DISCUSSIONS = 'discussions';
    public const RESEARCHES = 'researches';
    public const TECHNICAL_CERTIFICATES = 'technical-certificates';

    public const TITLES = [
        self::SIMPLE => 'Простой реестр',
        self::RULESET => 'Реестр сводов правил',
        self::LABORATORIES => 'Реестр испытательных лабораторий',
        self::CERTIFIERS => 'Реестр органов по сертификации',
        self::EXPERTS => 'Реестр экспертов',
        self::CERTIFICATES => 'Реестр сертификатов соответствия',
        self::COMPANIES => 'Реестр организаций',
        self::DEVELOPMENTS => 'Реестр планов разработки',
        self::DISCUSSIONS => 'Реестр публичных обсуждений',
        self::RESEARCHES => 'Реестр исследований',
        self::TECHNICAL_CERTIFICATES => 'Реестр технических свидетельств'
    ];

    public const OPTIONS = [
        self::SIMPLE => [],
        self::CATEGORIZED => ['categories' => true],
        self::RULESET => ['categories' => true, 'operations' => 'entry-operation-ruleset', 'states' => true],
        self::LABORATORIES => ['properties' => 'entry-properties-laboratory', 'states' => true],
        self::CERTIFIERS => ['properties' => 'entry-properties-certifier', 'states' => true],
        self::EXPERTS => ['categories' => true, 'states' => true],
        self::CERTIFICATES => ['categories' => true, 'properties' => 'entry-properties-certificate', 'states' => true],
        self::COMPANIES => ['properties' => 'entry-properties-company'],
        self::DEVELOPMENTS => ['categorized' => true, 'properties' => 'entry-properties-development'],
        self::DISCUSSIONS => ['properties' => 'entry-properties-discussion'],
        self::RESEARCHES => ['categories' => true, 'properties' => 'entry-properties-research'],
        self::TECHNICAL_CERTIFICATES => ['properties' => 'entry-properties-technical-certificate', 'states' => true]
    ];
}