<?php

namespace EasyInvoice\Admin\Helpers;

use EasyInvoice\Constants\PagesSlugs;

function easy_invoice_is_valid_page($page) {
    $valid_pages = [
        PagesSlugs::INVOICE_NEW,
        PagesSlugs::INVOICE_ID,
        PagesSlugs::DASHBOARD,
        PagesSlugs::ALL_INVOICES,
        PagesSlugs::CLIENTS,
        PagesSlugs::CLIENT_EDIT,
        PagesSlugs::CLIENT_VIEW,
        PagesSlugs::SETTINGS,
        PagesSlugs::REPORTS,
        PagesSlugs::INVOICE_PREVIEW,
    ];
    
    return in_array($page, $valid_pages, true);
}