<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

function idve_register_block( $type, $config ) {
    $core = IDVE_Core::instance();
    if ( ! $core || ! $core->blocks ) {
        return false;
    }
    return $core->blocks->register( $type, $config );
}

function idve_block_exists( $type ) {
    $core = IDVE_Core::instance();
    if ( ! $core || ! $core->blocks ) {
        return false;
    }
    return null !== $core->blocks->get( $type );
}

function idve_get_blocks() {
    $core = IDVE_Core::instance();
    if ( ! $core || ! $core->blocks ) {
        return array();
    }
    return $core->blocks->get_all();
}
