<?php
echo '<div class="wsdesk_wrapper">';

$plugin_name       = 'wsdesk';
$mail              = get_option( $plugin_name . '_email' );
$licence_key       = get_option( $plugin_name . '_licence_key' );
$instance          = get_option( $plugin_name . '_instance_id' );
$show_activation   = ( ! empty( get_option( $plugin_name . '_activation_status' ) ) && 'inactive' != get_option( $plugin_name . '_activation_status' ) ) ? 'hidden' : '';
$show_deactivation = ( empty( get_option( $plugin_name . '_activation_status' ) ) || 'inactive' == get_option( $plugin_name . '_activation_status' ) ) ? 'hidden' : '';
?>
<div id="result" class="aw-result-box"><?php esc_html_e( 'WSDesk Activate Msg', 'wsdesk' ); ?></div>
<div class="container">
	<div class="row">
		<ol class="breadcrumb crm-panel-right" style="margin-left: 0 !important;">
			<li><?php esc_html_e( 'Settings', 'wsdesk' ); ?></li>
			<li id="breadcrump_section" class="active"><?php esc_html_e( 'General', 'wsdesk' ); ?></li>
		</ol>
		<div class="col-md-3 crm-panel-left">
			<div class="panel panel-default crm-panel">
				<div class="panel-body">
					<ul class="nav nav-pills nav-stacked" role="tablist">
						<li class="active">
							<a href="#general_tab" data-toggle="tab" class="general"><?php esc_html_e( 'General', 'wsdesk' ); ?></a>
						</li>
						<li>
							<a href="#ticket_fields_tab" data-toggle="tab" class="ticket_fields"><?php esc_html_e( 'Ticket Settings', 'wsdesk' ); ?></a>
						</li>
						<li>
							<a href="#appearance_tab" data-toggle="tab" class="appearance"><?php esc_html_e( 'Form Settings', 'wsdesk' ); ?></a>
						</li>
						<li>
							<a href="#integrations_tab" data-toggle="tab" class="integrations"><?php esc_html_e( 'Integrations', 'wsdesk' ); ?></a>
							
						</li>
						<li>
							<a href="#triggers_tab" data-toggle="tab" class="wsdesk_triggers"><?php esc_html_e( 'Triggers & Automation', 'wsdesk' ); ?></a>
						</li>
						<li>
							<a href="#backup_restore_tab" data-toggle="tab" class="backup_restore"><?php esc_html_e( 'Data Management', 'wsdesk' ); ?></a>
						</li>
					</ul>
				</div>
			</div>
			<div class="alert alert-success" style="display: none" role="alert">
				<div id="success_alert_text"></div>
			</div>
			<div class="alert alert-danger" style="display: none" role="alert">
				<div id="danger_alert_text"></div>
			</div>
		</div>
		<div class="col-md-9 wsdesk_general_settings">
			<div class="panel panel-default crm-panel">
				<div class="panel-body">
					<ul id="myTabs" class="nav nav-pills nav-justified" role="tablist" data-tabs="tabs">

						<li class="active general_submenu">
							<a href="#general_tab" data-toggle="tab" class="general general_submenu"><?php esc_html_e( 'Basic Settings', 'wsdesk' ); ?></a>
						</li>
						<li class="advanced">
							<a href="#advanced_tab" data-toggle="tab" class="advanced"><?php esc_html_e( 'Advanced Settings', 'wsdesk' ); ?></a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div class="col-md-9 wsdesk_advanced_settings">
			<div class="panel panel-default crm-panel">
				<div class="panel-body">
					<ul id="myTabs" class="nav nav-pills nav-justified" role="tablist" data-tabs="tabs">

						<li class="active backup_restore_sub_menu">
							<a href="#backup_restore_tab" data-toggle="tab" class="backup_restore backup_restore_sub_menu"><?php esc_html_e( 'Cleanup, Backup & Restore', 'wsdesk' ); ?></a>
						</li>
						<li class="export">
							<a href="#export_tab" data-toggle="tab" class="export"><?php esc_html_e( 'Export Data (CSV)', 'wsdesk' ); ?></a>
						</li>
						<li class="archive">
							<a href="https://elextensions.com/plugin/wsdesk-wordpress-support-desk-plugin/" target="_blank" data-toggle="tab" class="archive"><?php esc_html_e( 'Archive Tickets', 'wsdesk' ); ?><span class="premium_update_setting"><sup class="text-success">[Premium!]</sup></span></a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div class="col-md-9 wsdesk_ticket_settings">
			<div class="panel panel-default crm-panel">
				<div class="panel-body">
					<ul id="myTabs" class="nav nav-pills nav-justified" role="tablist" data-tabs="tabs">

						<li class="active ticket_fields_submenu">
							<a href="#ticket_fields_tab" data-toggle="tab" class="ticket_fields ticket_fields_submenu"><?php esc_html_e( 'Ticket Fields', 'wsdesk' ); ?></a>
						</li>
						<li class="ticket_labels">
							<a href="#ticket_labels_tab" data-toggle="tab" class="ticket_labels"><?php esc_html_e( 'Ticket Status', 'wsdesk' ); ?></a>
						</li>
						<li class="ticket_tags">
							<a href="#ticket_tags_tab" data-toggle="tab" class="ticket_tags"><?php esc_html_e( 'Ticket Tags', 'wsdesk' ); ?></a>
						</li>
						<li class="ticket_views">
							<a href="#ticket_views_tab" data-toggle="tab" class="ticket_views"><?php esc_html_e( 'Ticket Views', 'wsdesk' ); ?></a>
						</li>
						<li class="ticket_page">
							<a href="#ticket_page_tab" data-toggle="tab" class="ticket_page"><?php esc_html_e( 'Ticket Page', 'wsdesk' ); ?></a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<div class="col-md-9">
			<div class="panel panel-default crm-panel">
				<div class="panel-body" style="padding: 5px !important">
					<div class="tab-content">
						<div class="loader"></div>
						<div class="tab-pane active general_settings" id="general_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_general.php' ; ?>
						</div>
						<div class="tab-pane" id="ticket_fields_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_fields.php' ; ?>
						</div>
						<div class="tab-pane" id="ticket_labels_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_labels.php' ; ?>
						</div>
						<div class="tab-pane" id="ticket_tags_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_tags.php' ; ?>
						</div>
						<div class="tab-pane" id="ticket_views_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_views.php' ; ?>
						</div>
						<div class="tab-pane" id="ticket_page_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_page.php' ; ?>
						</div>
						<div class="tab-pane" id="triggers_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_wsdesk_triggers.php' ; ?>
						</div>
						<div class="tab-pane" id="appearance_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_appearance.php' ; ?>
						</div>
						<div class="tab-pane" id="integrations_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_integrations.php' ; ?>
						</div>
						<div class="tab-pane" id="backup_restore_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_backup_restore.php' ; ?>
						</div>
						<div class="tab-pane" id="export_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_export.php' ; ?>
						</div>
						<div class="tab-pane" id="archive_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_archive_tickets.php' ; ?>
						</div>
						<div class="tab-pane general_settings" id="advanced_tab">
							<?php require EH_CRM_MAIN_VIEWS . 'settings/crm_settings_lite_mode.php' ; ?>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</div>
