<?php

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

add_action( 'admin_menu', 'tw_lem_admin_menu' );

/**
 * Register admin menu and submenus.
 */
function tw_lem_admin_menu() {
    add_menu_page(
        __( 'TW Link Expiration Manager', 'tw-link-expiration-manager' ),
        __( 'TW Link Expiration', 'tw-link-expiration-manager' ),
        'manage_options',
        'tw-lem',
        'tw_lem_render_tutorial_page',
        'dashicons-clock',
        57
    );

    add_submenu_page(
        'tw-lem',
        __( 'Tutorial', 'tw-link-expiration-manager' ),
        __( 'Tutorial', 'tw-link-expiration-manager' ),
        'manage_options',
        'tw-lem',
        'tw_lem_render_tutorial_page'
    );

    add_submenu_page(
        'tw-lem',
        __( 'Support', 'tw-link-expiration-manager' ),
        __( 'Support', 'tw-link-expiration-manager' ),
        'manage_options',
        'tw-lem-support',
        'tw_lem_support_page'
    );
}
