<?php
/**
 * This file will create admin menu page.
 */

class FWFORMS_Create_Admin_Page {

    public function __construct() {
        add_action( 'admin_menu', [ $this, 'create_admin_menu' ] );
    }

    public function create_admin_menu() {
        $capability = 'manage_options';
        $slug = 'freshworks-forms';

        add_menu_page(
            __( 'Freshworks Forms', 'fw-forms' ),
            __( 'Freshworks Forms', 'fw-forms' ),
            $capability,
            $slug,
            [ $this, 'menu_page_template' ],
            'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBUODAsLDBkSEw8VHhsgHx4bHR0hJTApISMtJB0dKjkqLTEzNjY2ICg7Pzo0PjA1NjP/2wBDAQkJCQwLDBgODhgzIh0iMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzP/wAARCAAQABADASIAAhEBAxEB/8QAFwAAAwEAAAAAAAAAAAAAAAAAAwQFBv/EACIQAAEDBAICAwAAAAAAAAAAAAECAwQABRESBjEhQVFx0f/EABUBAQEAAAAAAAAAAAAAAAAAAAME/8QAHxEAAQMFAAMAAAAAAAAAAAAAAQMEEQACBSFBEjFh/9oADAMBAAIRAxEAPwDeX7l7jM92JHwhLaygHPlZHZwKHaptyelsPSJTqUlxIS0DgEE+/wApDk/GJ8G8SLpb4ypCHV7jVO+hPYI++qqcTtc98Ifntuo0d3Up1OpWfGMD4qfMOFhbYg1EeUSe/d8oGmFJVLxwpNo9Ce81X//Z'
        );
    }

    public function menu_page_template() {
        echo '<div id="app"></div>';
    }

}
new FWFORMS_Create_Admin_Page();