<?php
namespace OxygenApp\Hooks;
if ( ! defined( 'ABSPATH' ) ) exit;

use OxygenApp\Models\BackgroundSound;
use OxygenApp\Views\Admin\Sounds\SoundsCptMetabox;
use OxygenApp\Views\Admin\Backgrounds\BackgroundMetabox;
use OxygenApp\Models\Background;
use OxygenApp\Hooks\IHook;

class ActionMetaBoxes implements IHook {


    static function register() {
        add_action('add_meta_boxes', [self::class, 'addMetaBoxes']);
    }

    static function addMetaBoxes() {
        $soundsCptmbx = new SoundsCptMetabox();
        add_meta_box(
            'custom_meta_box_sounds_editor',
            esc_html__('Edit sound options', 'oxyleaf-app-working-and-relaxing-app'),
            [$soundsCptmbx, 'render'],
            BackgroundSound::POST_TYPE,
            'normal',
            'high'
        );

        $backgroundCptmbx = new BackgroundMetabox();
        add_meta_box(
            'custom_meta_box_back_editor',
            esc_html__('Edit background options', 'oxyleaf-app-working-and-relaxing-app'),
            [$backgroundCptmbx, 'render'],
            Background::POST_TYPE,
            'normal',
            'high'
        );
    }
}