<?php
    


class agile_tix_template_registration {

    private $agile_tix;
    private $version;

    public function __construct($agile_tix, $version)
    {
        $this->agile_tix = $agile_tix;
        $this->version = $version;
    }

    function register_agile_template(){

        ob_start();

        include(plugin_dir_path(__FILE__) . '../page-templates/page-agile_post.php');

        $template_content = ob_get_clean();

        //this is THE reason why our min WP version is 6.7
        register_block_template(
            'agile-tix-plugin//agile-post-template',
            [
                'title' => __('AgileTix Post Template', 'agile-ticketing-WPPlugin'),
                'description' => __('An example block template from a plugin.', 'WPPlugin'),
                'post_types' => array('agile_post'),
                'content' => $template_content,
                'plugin' => 'agile_tix',
                    //file_get_contents( plugin_dir_path( __FILE__ ) . '../templates/page-agile_post.php'),
                //'render_callback' => 'agile_tix_template_registration::agile_template_render_callback',
            ]);
            
        //add unregister_block_template( 'devblog-plugin-templates//my-template' ) to deactivate
    }

}
