<?php

namespace App\Services;

use App\Enums\ModerationStatus;
use App\Models\SystemSetting;

class ContentModerationService
{
    public function initialStatus(): ModerationStatus
    {
        $setting = SystemSetting::query()->where('key', 'content_auto_approve')->first();

        if (($setting?->value['enabled'] ?? false) === true) {
            return ModerationStatus::Approved;
        }

        return ModerationStatus::Pending;
    }
}
