<div class="row insights_widget" id="SectionScanResultsPtg">
	<div class="col-12">
		<div class="card card-scan_results">

			<div class="card-header">
				<h5 class="card-title">Plugin / Theme Modifications</h5>
				<h6 class="card-subtitle text-muted">
					Tracks changes to important files within active Plugins and Themes
				</h6>
			</div>

			<div class="card-body">
				{% if scan.flags.is_available %}
					{% if scan.flags.is_enabled %}

						{% if not scan.flags.has_items %}
							<div class="alert alert-info m-0">No items discovered</div>
						{% else %}
							{% include '/wpadmin_pages/insights_new/scans/results/'~scankey~'_table.twig' %}
						{% endif %}

					{% else %}
						{% include '/wpadmin_pages/insights_new/scans/results/'~scankey~'_disabled.twig' %}
					{% endif %}
				{% else %}
					{% include '/wpadmin_pages/insights_new/scans/results/common_unavailable.twig' %}
				{% endif %}
			</div>

			<div class="card-footer">
				<div class="row">
					<div class="col-sm-6">
						{% if scan.flags.has_last_scan %}
							{{ scan.vars.last_scan_at }}
						{% else %}
							{{ strings.never }}
						{% endif %}
					</div>
					<div class="col-sm-6 text-right">
						<a href="{{ scan.hrefs.options }}"
						   class="btn btn-sm btn-outline-dark">{{ strings.options }} &rarr;</a>
					</div>
				</div>
			</div>

		</div>
	</div>
</div>
<script>
	jQuery( 'div.scan-table-for-slug' ).each( function () {
		var $oDiv = jQuery( this );
		$oDiv.icwpWpsfAjaxTable(
			{
				'ajax_render':{{ ajax.render_table_scan|raw }},
				'req_params': {
					'fScan': 'ptg',
					'fSlug': $oDiv.data( 'slug' )
				}
			}
		);
	} );

	jQuery( '#SectionScanResultsPtg' ).icwpWpsfTableActions(
		{
			'table': '',
			'ajax_bulk_action':{{ ajax.bulk_action|raw }},
			'ajax_item_delete':{{ ajax.item_delete|raw }},
			'ajax_item_ignore':{{ ajax.item_ignore|raw }},
			'ajax_item_repair':{{ ajax.item_repair|raw }},
			'custom_actions_ajax': {
				'item_asset_accept': {{ ajax.item_asset_accept|raw }},
				'item_asset_deactivate': {{ ajax.item_asset_deactivate|raw }},
				'item_asset_reinstall': {{ ajax.item_asset_reinstall|raw }}
			},
			'req_params': {
				'fScan': 'ptg'
			}
		}
	);
</script>