<?php

namespace Hecate\Components\Shortcode;

use Hecate\Components\ComponentBase;

class ShortcodeComponent extends ComponentBase {

	public static $type         = 'shortcode';
	protected static $rootClass = 'hecate-shortcode';
	protected static $template  = 'components/shortcode';


    public function getSections() {
        return array(
            array(
                'id'              => $this->getSectionId(),
                'title'           => __( 'Shortcode', 'hecate' ),
                'hiddenSection'   => true,
                'panel'           => $this->getCurrentPanel(),
                'type'            => 'hecate-tab-section',
                'priority'        => 1,
            ),
        );
    }

	public function renderShortcode() {
		echo do_shortcode(  $this->getAttribute( 'shortcode', '' ) );
	}
}

