# automatically generated file, don't edit



# Copyright 2011 David Cantrell, derived from data from libphonenumber
# http://code.google.com/p/libphonenumber/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package Number::Phone::StubCountry::AZ;
use base qw(Number::Phone::StubCountry);

use strict;
use warnings;
use utf8;
our $VERSION = 1.20201204215954;

my $formatters = [
                {
                  'format' => '$1 $2 $3',
                  'intl_format' => 'NA',
                  'leading_digits' => '[1-9]',
                  'pattern' => '(\\d{3})(\\d{2})(\\d{2})'
                },
                {
                  'format' => '$1 $2 $3 $4',
                  'leading_digits' => '90',
                  'national_rule' => '0$1',
                  'pattern' => '(\\d{3})(\\d{2})(\\d{2})(\\d{2})'
                },
                {
                  'format' => '$1 $2 $3 $4',
                  'leading_digits' => '
            1[28]|
            2|
            365(?:
              [0-46-9]|
              5[0-35-9]
            )|
            46
          ',
                  'national_rule' => '(0$1)',
                  'pattern' => '(\\d{2})(\\d{3})(\\d{2})(\\d{2})'
                },
                {
                  'format' => '$1 $2 $3 $4',
                  'leading_digits' => '[13-9]',
                  'national_rule' => '0$1',
                  'pattern' => '(\\d{2})(\\d{3})(\\d{2})(\\d{2})'
                }
              ];

my $validators = {
                'fixed_line' => '
          (?:
            222[0-79]\\d|
            365(?:
              [0-46-9]\\d|
              5[0-35-9]
            )
          )\\d{4}|
          (?:
            (?:
              1[28]|
              46
            )\\d|
            2(?:
              [045]2|
              1[24]|
              2[34]|
              33|
              6[23]
            )
          )\\d{6}
        ',
                'geographic' => '
          (?:
            222[0-79]\\d|
            365(?:
              [0-46-9]\\d|
              5[0-35-9]
            )
          )\\d{4}|
          (?:
            (?:
              1[28]|
              46
            )\\d|
            2(?:
              [045]2|
              1[24]|
              2[34]|
              33|
              6[23]
            )
          )\\d{6}
        ',
                'mobile' => '
          (?:
            36554|
            99[2-9]\\d\\d
          )\\d{4}|
          (?:
            [16]0|
            4[04]|
            5[015]|
            7[07]
          )\\d{7}
        ',
                'pager' => '',
                'personal_number' => '',
                'specialrate' => '(900200\\d{3})',
                'toll_free' => '88\\d{7}',
                'voip' => ''
              };
my %areanames = ();
$areanames{en} = {"9942227", "Samukh",
"9942020", "Barda",
"9942335", "Shabran",
"9942124", "Imishli",
"9942028", "Ismayilli",
"9942629", "Khojavand",
"9942231", "Tovuz",
"9942122", "Beylagan",
"9942232", "Gadabay",
"9942121", "Shirvan",
"99418", "Sumgayit",
"9942021", "Ujar",
"9942024", "Gobustan",
"9942128", "Saatli",
"9942022", "Agsu",
"9942120", "Hajigabul",
"9942225", "Ganja",
"99436550", "Nakhchivan\ city",
"99412", "Baku",
"9942230", "Shamkir",
"9942626", "Shusha",
"9942620", "Khojali",
"99436549", "Sadarak",
"9942425", "Gakh",
"9942126", "Neftchala",
"9942527", "Lerik",
"9942333", "Guba",
"99436542", "Sharur",
"9942029", "Zardab",
"9942628", "Agdara",
"9942624", "Askaran",
"9942622", "Khankandi",
"9942223", "Tartar",
"9942621", "Lachin",
"99421428", "Hajigabul",
"9942026", "Shamakhi",
"9942427", "Mingachevir",
"99436546", "Julfa",
"9942525", "Lankaran",
"9942229", "Gazakh",
"9942631", "Fuzuli",
"9942421", "Oguz",
"9942233", "Yevlakh",
"9942632", "Agdam",
"9942424", "Shaki",
"9942422", "Zagatala",
"9942123", "Sabirabad",
"9942627", "Kalbajar",
"99422428", "Agstafa\/Ganja\/Yevlakh",
"99436547", "Ordubad",
"99436552", "Sharur",
"9942520", "Yardimli",
"99436548", "Kangarli",
"9942625", "Zangilan",
"9942420", "Gabala",
"9942226", "Ganja",
"9942630", "Hadrut",
"9942521", "Masalli",
"9942638", "Jabrayil",
"9942023", "Agdash",
"9942522", "Astara",
"9942524", "Jalilabad",
"9942331", "Khizi",
"9942332", "Khachmaz",
"9942529", "Bilasuvar",
"9942125", "Salyan",
"9942220", "Goygol",
"99436543", "Shahbuz",
"9942235", "Naftalan",
"9942027", "Goychay",
"9942127", "Agjabadi",
"99436541", "Babek",
"9942025", "Kurdamir",
"9942330", "Siyazan",
"9942222", "Agstafa",
"9942338", "Gusar",
"9942224", "Goranboy",
"99436544", "Nakhchivan\ city",
"9942221", "Dashkasan",
"9942429", "Balakan",
"9942623", "Qubadli",};

    sub new {
      my $class = shift;
      my $number = shift;
      $number =~ s/(^\+994|\D)//g;
      my $self = bless({ number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
      return $self if ($self->is_valid());
      $number =~ s/^(?:0)//;
      $self = bless({ number => $number, formatters => $formatters, validators => $validators, areanames => \%areanames}, $class);
      return $self->is_valid() ? $self : undef;
    }
1;