<?php

namespace App\Campaigns\Platforms;

class TikTokRules extends UnsupportedPlatformRules
{
    public function key(): string
    {
        return 'tiktok';
    }

    public function name(): string
    {
        return 'TikTok';
    }

    /**
     * TikTok's own minimum, which it enforces on create.
     *
     * TikTok sets two: a campaign daily budget of at least 50.00, and an ad
     * group daily budget of at least 20.00. This product holds the budget on
     * the ad set by default, so the ad group figure is the one that applies to
     * almost every campaign it builds.
     *
     * A campaign-level budget therefore needs 50.00 rather than this, which is
     * a distinction to make when TikTok gets a publisher and the budget level
     * becomes something that reaches the API. Until then nothing here can
     * publish, so the stricter figure would only refuse drafts.
     *
     * Published in USD. TikTok states its minimums per currency and they are
     * not conversions of each other, so confirm against the current rate card
     * before the first live campaign.
     */
    public function minimumDailyBudget(): float
    {
        return 20.00;
    }

    public function supportedAssetRatios(): array
    {
        return ['9:16', '1:1', '16:9'];
    }
}
