<?php
namespace Booktics\Shortcode;

/**
 * Booking shortcode class
 */
class Booking_Shortcode {
    /**
     * Constructor for booking shortcode
     *
     * @return  void
     */
    public function __construct() {
        add_shortcode( 'booktics_booking_form', array( $this, 'render_booking_form' ) );
    }


    /**
     * Render booking form
     *
     * @param   array  $attributes
     *
     * @return  string
     */
    public function render_booking_form( $attributes ) {
        wp_enqueue_style( 'booktics-vendor' );
        wp_enqueue_style( 'booktics-frontend' );

        wp_enqueue_script( 'booktics-packages' );
        wp_enqueue_script( 'booktics-frontend-scripts' );
        wp_enqueue_script( 'booktics-flatpickr-scripts' );
        
        do_action( 'booktics_before_rendering_booking_form_shortcode' );

        return '<div id="booktics-booking-form"></div>';
    }
}
