/// <reference path="../.astro/types.d.ts" />

import type PocketBase from 'pocketbase';
import type { RecordModel } from 'pocketbase';

// 1. Описание переменных окружения (.env)
interface ImportMetaEnv {
    readonly POCKETBASE_URL: string;

    // Настройки почты
    readonly MAIL_HOST: string;
    readonly MAIL_PORT: string;
    readonly MAIL_FROM: string;
    readonly ADMIN_EMAIL: string;
}

interface ImportMeta {
    readonly env: ImportMetaEnv;
}

// 2. Глобальные типы Astro
declare namespace App {
    interface Locals {
        pb: PocketBase;
        user: RecordModel | undefined;
    }
}