<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Whois TLD Configuration
    |--------------------------------------------------------------------------
    |
    | Bu dosya her TLD için whois server ve query format bilgilerini içerir.
    | Yeni TLD'ler eklemek için bu dosyayı güncelleyin.
    |
    */

    'default_server' => 'whois.iana.org',
    'default_timeout' => 30,
    'default_encoding' => 'UTF-8',

    'tlds' => [
        // Generic TLDs
        'com' => [
            'server' => 'whois.verisign-grs.com',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'net' => [
            'server' => 'whois.verisign-grs.com',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'org' => [
            'server' => 'whois.pir.org',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'info' => [
            'server' => 'whois.afilias.net',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],

        // Country Code TLDs
        'tr' => [
            'server' => 'whois.nic.tr',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'de' => [
            'server' => 'whois.denic.de',
            'query_format' => '-T dn {domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'uk' => [
            'server' => 'whois.nic.uk',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'fr' => [
            'server' => 'whois.nic.fr',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'it' => [
            'server' => 'whois.nic.it',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'es' => [
            'server' => 'whois.nic.es',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'nl' => [
            'server' => 'whois.domain-registry.nl',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'ru' => [
            'server' => 'whois.tcinet.ru',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'cn' => [
            'server' => 'whois.cnnic.cn',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'jp' => [
            'server' => 'whois.jprs.jp',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'au' => [
            'server' => 'whois.auda.org.au',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'ca' => [
            'server' => 'whois.cira.ca',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'br' => [
            'server' => 'whois.registro.br',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'mx' => [
            'server' => 'whois.mx',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'ar' => [
            'server' => 'whois.nic.ar',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],

        // New gTLDs
        'app' => [
            'server' => 'whois.nic.google',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'dev' => [
            'server' => 'whois.nic.google',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'blog' => [
            'server' => 'whois.nic.blog',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'shop' => [
            'server' => 'whois.nic.shop',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'store' => [
            'server' => 'whois.nic.store',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'tech' => [
            'server' => 'whois.nic.tech',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'online' => [
            'server' => 'whois.nic.online',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'site' => [
            'server' => 'whois.nic.site',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'web' => [
            'server' => 'whois.nic.web',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
        'digital' => [
            'server' => 'whois.nic.digital',
            'query_format' => '{domain}',
            'response_encoding' => 'UTF-8',
            'timeout' => 30,
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Response Parsing Rules
    |--------------------------------------------------------------------------
    |
    | Her TLD için response parsing kuralları
    |
    */
    'parsing_rules' => [
        'com' => [
            'registrar' => '/Registrar:\s*(.+)/i',
            'creation_date' => '/Creation Date:\s*(.+)/i',
            'expiration_date' => '/Registry Expiry Date:\s*(.+)/i',
            'status' => '/Status:\s*(.+)/i',
        ],
        'net' => [
            'registrar' => '/Registrar:\s*(.+)/i',
            'creation_date' => '/Creation Date:\s*(.+)/i',
            'expiration_date' => '/Registry Expiry Date:\s*(.+)/i',
            'status' => '/Status:\s*(.+)/i',
        ],
        'org' => [
            'registrar' => '/Registrar:\s*(.+)/i',
            'creation_date' => '/Created:\s*(.+)/i',
            'expiration_date' => '/Registry Expiry Date:\s*(.+)/i',
            'status' => '/Status:\s*(.+)/i',
        ],
        'tr' => [
            'registrar' => '/Registrar:\s*(.+)/i',
            'creation_date' => '/Created:\s*(.+)/i',
            'expiration_date' => '/Expires:\s*(.+)/i',
            'status' => '/Status:\s*(.+)/i',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Cache Settings
    |--------------------------------------------------------------------------
    |
    | Whois sorguları için cache ayarları
    |
    */
    'cache' => [
        'enabled' => true,
        'ttl' => 3600, // 1 saat
        'prefix' => 'whois_query_',
    ],
];
