package Amazon::API::Constants;

use strict;
use warnings;

use Log::Log4perl::Level;

use parent qw( Exporter );

use Readonly;

our @EXPORT_OK = ();

our %EXPORT_TAGS = (
  'booleans' => [
    qw(
      $TRUE
      $FALSE
      $SUCCESS
      $FAILURE
    )
  ],

  'chars' => [
    qw(
      $AMPERSAND
      $COLON
      $COMMA
      $DOUBLE_COLON
      $DASH
      $DOT
      $EMPTY
      $EQUALS_SIGN
      $OCTOTHORP
      $PERIOD
      $QUESTION_MARK
      $SLASH
      $SPACE
      $TEMPLATE_DELIMITER
      $UNDERSCORE
    )
  ],
  'strings' => [
    qw(
      $PADDING
    )
  ],
  'defaults' => [qw($DEFAULT_LOG4PERL_LAYOUT)],
  'levels'   => [qw(%LOG4PERL_LOG_LEVELS)],
);

our $VERSION = '2.4.6';

# chars
Readonly::Scalar our $AMPERSAND          => q{&};
Readonly::Scalar our $COLON              => q{:};
Readonly::Scalar our $COMMA              => q{,};
Readonly::Scalar our $DOUBLE_COLON       => q{::};
Readonly::Scalar our $DASH               => q{-};
Readonly::Scalar our $DOT                => q{.};
Readonly::Scalar our $EMPTY              => q{};
Readonly::Scalar our $EQUALS_SIGN        => q{=};
Readonly::Scalar our $OCTOTHORP          => q{#};
Readonly::Scalar our $PERIOD             => q{.};
Readonly::Scalar our $QUESTION_MARK      => q{?};
Readonly::Scalar our $SLASH              => q{/};
Readonly::Scalar our $SPACE              => q{ };
Readonly::Scalar our $TEMPLATE_DELIMITER => q{@};
Readonly::Scalar our $UNDERSCORE         => q{_};

# strings
Readonly::Scalar our $PADDING => $SPACE x 4;

# booleans
Readonly::Scalar our $TRUE  => 1;
Readonly::Scalar our $FALSE => 0;

# shell booleans
Readonly::Scalar our $SUCCESS => 0;
Readonly::Scalar our $FAILURE => 1;

Readonly::Scalar our $DEFAULT_LOG4PERL_LAYOUT => '[%d{ISO8601}] %p %c - %m%n';

Readonly::Hash our %LOG4PERL_LOG_LEVELS => (
  error => $ERROR,
  warn  => $WARN,
  info  => $INFO,
  debug => $DEBUG,
  trace => $TRACE,
  fatal => $FATAL,
);

foreach my $k ( keys %EXPORT_TAGS ) {
  push @EXPORT_OK, @{ $EXPORT_TAGS{$k} };
}

$EXPORT_TAGS{'all'} = [@EXPORT_OK];

1;

__END__
