<?php

declare(strict_types=1);

namespace App\Framework\Config\External;

use App\Framework\Config\Environment;

final readonly class ExternalApiConfig
{
    public function __construct(
        public ShopifyConfig $shopify,
        public RapidMailConfig $rapidMail,
    ) {
    }

    public static function fromEnvironment(Environment $env): self
    {
        return new self(
            shopify: ShopifyConfig::fromEnvironment($env),
            rapidMail: RapidMailConfig::fromEnvironment($env),
        );
    }
}
