package HaCi::Plugins::TEMPLATE;

use strict;
use warnings;

use base qw/HaCi::Plugin/;
use HaCi::Mathematics qw/dec2net netv6Dec2net/;
use HaCi::Utils qw/netID2Stuff/;
use HaCi::GUI::gettext qw/_gettext/;

our $INFO	= {
	name				=> 'TEMPLATE',
	version			=> '0.1',
	recurrent		=> 1,
	onDemand		=> 1,
	description	=> _gettext('TEMPLATE'),
	api					=> [
		{
			name	=> 'TEMPLATE', 
			descr	=> _gettext("TEMPLATE"),
		},
		...
	],
	globMenuRecurrent	=> [
		{
			TYPE			=> 'label',
			VALUE			=> 'TEMPLATE',
		},
		...
	],
	globMenuOnDemand	=> [
		{
			TYPE			=> 'label',
			VALUE			=> 'TEMPLATE',
		},
		...
	],
	menuRecurrent	=> [
		{
			TYPE			=> 'label',
			VALUE			=> 'TEMPLATE',
		},
		...
	],
	menuOnDemand	=> [
		{
			TYPE			=> 'label',
			VALUE			=> 'TEMPLATE',
		},
		...
	],
};

sub run_recurrent {
	my $self			= shift;
	my $networks	= shift;
	my $config		= shift;

	...

	return 1;
}

sub run_onDemand {
	my $self				= shift;
	my $networkRef	= shift;
	my $networkDec	= $networkRef->{network};
	my $network			= ($networkRef->{ipv6ID}) ? &netv6Dec2net($networkDec) : &dec2net($networkDec);
	my $ip					= (split(/\//, $network))[0];

	...

	return 1;
}

sub show {
	my $self				= shift;
	my $netID				= shift;
	my $values			= $self->getValues($netID);
	my $results			= {};
	my $lastUpdated	= $self->getValue(-1, 'lastUpdated');

	my $show	= {
		HEADER	=> "TEMPLATE",
		BODY		=> [
			{
				elements	=> [
					{
						target	=> 'single',
						type		=> 'label',
						value		=> 'TEMPLATE',
					},
					...
				]
			},
		]
	};

	return $show;
}

1;
