<?php

declare(strict_types=1);

namespace Kylin\ElderlyCare;

use Illuminate\Support\ServiceProvider;

/**
 * 智慧养老服务提供者
 *
 * 提供养老机构管理功能，包括老人档案、健康监测、
 * 护理计划、家属关爱等。
 */
final class ElderlyCareServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->mergeConfigFrom(__DIR__ . '/../config/elderly-care.php', 'elderly-care');
    }

    public function boot(): void
    {
        if ($this->app->runningInConsole()) {
            $this->publishes([
                __DIR__ . '/../config/elderly-care.php' => config_path('elderly-care.php'),
            ], 'elderly-care-config');
        }

        $this->loadTranslationsFrom(__DIR__ . '/../lang', 'elderly-care');
    }
}
