# 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::IE;
use base qw(Number::Phone::StubCountry);

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

my $formatters = [
                {
                  'format' => '$1 $2',
                  'leading_digits' => '
            2[24-9]|
            47|
            58|
            6[237-9]|
            9[35-9]
          ',
                  'national_rule' => '(0$1)',
                  'pattern' => '(\\d{2})(\\d{5})'
                },
                {
                  'format' => '$1 $2',
                  'leading_digits' => '[45]0',
                  'national_rule' => '(0$1)',
                  'pattern' => '(\\d{3})(\\d{5})'
                },
                {
                  'format' => '$1 $2 $3',
                  'leading_digits' => '1',
                  'national_rule' => '(0$1)',
                  'pattern' => '(\\d)(\\d{3,4})(\\d{4})'
                },
                {
                  'format' => '$1 $2 $3',
                  'leading_digits' => '
            [2569]|
            4[1-69]|
            7[14]
          ',
                  'national_rule' => '(0$1)',
                  'pattern' => '(\\d{2})(\\d{3})(\\d{3,4})'
                },
                {
                  'format' => '$1 $2 $3',
                  'leading_digits' => '70',
                  'national_rule' => '0$1',
                  'pattern' => '(\\d{3})(\\d{3})(\\d{3})'
                },
                {
                  'format' => '$1 $2 $3',
                  'leading_digits' => '81',
                  'national_rule' => '(0$1)',
                  'pattern' => '(\\d{3})(\\d{3})(\\d{3})'
                },
                {
                  'format' => '$1 $2 $3',
                  'leading_digits' => '[78]',
                  'national_rule' => '0$1',
                  'pattern' => '(\\d{2})(\\d{3})(\\d{4})'
                },
                {
                  'format' => '$1 $2 $3',
                  'leading_digits' => '1',
                  'pattern' => '(\\d{4})(\\d{3})(\\d{3})'
                },
                {
                  'format' => '$1 $2 $3',
                  'leading_digits' => '4',
                  'national_rule' => '(0$1)',
                  'pattern' => '(\\d{2})(\\d{4})(\\d{4})'
                },
                {
                  'format' => '$1 $2 $3 $4',
                  'leading_digits' => '8',
                  'national_rule' => '0$1',
                  'pattern' => '(\\d{2})(\\d)(\\d{3})(\\d{4})'
                }
              ];

my $validators = {
                'fixed_line' => '
          (?:
            1\\d|
            21
          )\\d{6,7}|
          (?:
            2[24-9]|
            4(?:
              0[24]|
              5\\d|
              7
            )|
            5(?:
              0[45]|
              1\\d|
              8
            )|
            6(?:
              1\\d|
              [237-9]
            )|
            9(?:
              1\\d|
              [35-9]
            )
          )\\d{5}|
          (?:
            23|
            4(?:
              [1-469]|
              8\\d
            )|
            5[23679]|
            6[4-6]|
            7[14]|
            9[04]
          )\\d{7}
        ',
                'geographic' => '
          (?:
            1\\d|
            21
          )\\d{6,7}|
          (?:
            2[24-9]|
            4(?:
              0[24]|
              5\\d|
              7
            )|
            5(?:
              0[45]|
              1\\d|
              8
            )|
            6(?:
              1\\d|
              [237-9]
            )|
            9(?:
              1\\d|
              [35-9]
            )
          )\\d{5}|
          (?:
            23|
            4(?:
              [1-469]|
              8\\d
            )|
            5[23679]|
            6[4-6]|
            7[14]|
            9[04]
          )\\d{7}
        ',
                'mobile' => '
          8(?:
            22|
            [35-9]\\d
          )\\d{6}
        ',
                'pager' => '',
                'personal_number' => '700\\d{6}',
                'specialrate' => '(18[59]0\\d{6})|(
          15(?:
            1[2-8]|
            [2-8]0|
            9[089]
          )\\d{6}
        )|(818\\d{6})',
                'toll_free' => '1800\\d{6}',
                'voip' => '76\\d{7}'
              };
my %areanames = ();
$areanames{en} = {"3534330", "Longford",
"35369", "Newcastle\ West",
"35326", "Macroom",
"3534999", "Cavan\/Cootehill\/Oldcastle\/Belturbet",
"3536299", "Tipperary",
"353447", "Castlepollard",
"353531", "Wexford",
"353710", "Sligo",
"353530", "Wexford",
"353711", "Sligo",
"3539066", "Roscommon",
"3535274", "Cahir",
"353669100", "Killorglin",
"3536477", "Rathmore",
"353909900", "Athlone",
"353467", "Navan",
"3534291", "Dundalk",
"35374920", "Letterkenny",
"35343667", "Granard",
"353454", "The\ Curragh",
"3535393", "Ferns",
"353539901", "Wexford",
"3537495", "Dungloe",
"3536693", "Dingle",
"353469900", "Navan",
"353402", "Arklow",
"3534294", "Dundalk",
"35357859", "Portlaoise",
"35363", "Rathluirc",
"353749214", "Letterkenny",
"35356", "Kilkenny\/Castlecomer\/Freshford",
"35324", "Youghal",
"353458", "Naas",
"353749212", "Letterkenny",
"3535261", "Clonmel",
"35374", "Letterkenny\/Donegal\/Dungloe\/Buncrana",
"3535390", "Wexford",
"3536690", "Killorglin",
"353465", "Enfield",
"353471", "Monaghan\/Clones",
"353470", "Monaghan\/Clones",
"3535786", "Portlaoise",
"3534296", "Carrickmacross",
"353463", "Navan\/Kells\/Trim\/Edenderry\/Enfield",
"3535688", "Freshford",
"353619", "Scariff",
"353624", "Tipperary",
"353494", "Cavan",
"353628", "Tipperary",
"353498", "Oldcastle",
"35358", "Dungarvan",
"353659", "Kilrush",
"3534492", "Tyrellspass",
"35343666", "Granard",
"3539064", "Athlone",
"3534333", "Longford",
"3534199", "Drogheda\/Ardee",
"3534692", "Kells",
"3537491", "Letterkenny",
"353438", "Granard",
"35394925", "Castlebar",
"353918", "Loughrea",
"353466", "Edenderry",
"353749210", "Letterkenny",
"35328", "Skibbereen",
"3534295", "Carrickmacross",
"3534120", "Drogheda\/Ardee",
"353909902", "Ballinasloe",
"353949291", "Castlebar",
"35361", "Limerick",
"353462", "Kells",
"353443", "Mullingar\/Castlepollard\/Tyrrellspass",
"353901", "Athlone",
"353900", "Athlone",
"3534299", "Dundalk\/Carrickmacross\/Castleblaney",
"353473", "Monaghan",
"3534298", "Castleblaney",
"353460", "Navan",
"353469907", "Edenderry",
"353475", "Clones",
"353461", "Navan",
"3534510", "Kildare",
"35374989", "Letterkenny",
"353719401", "Sligo",
"3534297", "Castleblaney",
"3535787", "Abbeyleix",
"353512", "Kilmacthomas",
"353658", "Kilrush",
"353504", "Thurles",
"35391", "Galway",
"3539490", "Castlebar",
"35361999", "Limerick\/Scariff",
"353476", "Monaghan",
"353629", "Cashel",
"353499", "Belturbet",
"35343", "Longford\/Granard",
"3534332", "Longford",
"35343668", "Granard",
"353909901", "Athlone",
"353516", "Carrick\-on\-Suir",
"353539900", "Wexford",
"353719900", "Sligo",
"353654", "Ennis",
"353469901", "Navan",
"353472", "Clones",
"3534693", "Kells",
"3536466", "Killarney",
"35395", "Clifden",
"353531202", "Enniscorthy",
"353459", "Naas",
"353217", "Coachford",
"353428", "Dundalk",
"3535964", "Baltinglass",
"35327", "Bantry",
"3539493", "Claremorris",
"35399", "Kilronan",
"353424", "Carrickmacross",
"3532140", "Kinsale",
"3535791", "Birr",
"3534690", "Navan",
"353949290", "Castlebar",
"3536599", "Ennis\/Ennistymon\/Kilrush",
"353539902", "Enniscorthy",
"353477", "Monaghan",
"3537497", "Donegal",
"3535644", "Castlecomer",
"35393", "Tuam",
"3534490", "Tyrellspass",
"35341", "Drogheda",
"3536692", "Dingle",
"35357", "Portlaoise\/Abbeyleix\/Tullamore\/Birr",
"3535392", "Enniscorthy",
"353749211", "Letterkenny",
"353646700", "Killarney",
"3536695", "Cahirciveen",
"3537493", "Buncrana",
"35368", "Listowel",
"353626", "Cashel",
"353496", "Cavan",
"353479", "Monaghan",
"353749889", "Letterkenny",
"3539498", "Castlerea",
"3535987", "Athy",
"353448", "Tyrellspass",
"35325", "Fermoy",
"3534331", "Longford",
"3534791", "Monaghan\/Clones",
"353651", "Ennis\/Ennistymon\/Kilrush",
"353949286", "Castlebar",
"353650", "Ennis\/Ennistymon\/Kilrush",
"353492", "Cootehill",
"353622", "Cashel",
"35343669", "Granard",
"35321", "Cork",
"353464", "Trim",
"35351", "Waterford",
"3536696", "Cahirciveen",
"3535989", "Athy",
"353623", "Tipperary",
"3537196", "Carrick\-on\-Shannon",
"3535988", "Athy",
"353493", "Belturbet",
"353457", "Naas",
"353579900", "Portlaoise",
"353719331", "Sligo",
"353625", "Tipperary",
"353495", "Cootehill",
"3534290", "Dundalk",
"353912", "Gort",
"353432", "Longford",
"353909897", "Athlone",
"353741", "Letterkenny",
"353740", "Letterkenny",
"35371931", "Sligo",
"353916", "Gort",
"353468", "Navan",
"353560", "Kilkenny",
"353561", "Kilkenny",
"353749888", "Letterkenny",
"3534293", "Dundalk",
"353455", "Kildare",
"3535391", "Wexford",
"3534498", "Castlepollard",
"3537191", "Sligo",
"353627", "Cashel",
"3536691", "Dingle",
"353497", "Cavan",
"353453", "The\ Curragh",
"3534499", "Mullingar\/Castlepollard\/Tyrrellspass",
"35364", "Killarney\/Rathmore",
"3535678", "Kilkenny",
"3532147", "Kinsale",
"3534697", "Edenderry",
"3539097", "Portumna",
"35359", "Carlow\/Muine\ Bheag\/Athy\/Baltinglass",
"35323", "Bandon",
"35371959", "Carrick\-on\-Shannon",
"353909903", "Ballinasloe",
"3536694", "Cahirciveen",
"3535394", "Gorey",
"35353", "Wexford\/Enniscorthy\/Ferns\/Gorey",
"35329", "Kanturk",
"35366", "Tralee",
"35371", "Sligo\/Manorhamilton\/Carrick\-on\-Shannon",
"3534497", "Castlepollard",
"353404", "Wicklow",
"353456", "Naas",
"353569901", "Kilkenny",
"3535991", "Carlow",
"353719335", "Sligo",
"353437", "Granard",
"353416", "Ardee",
"353421", "Dundalk\/Carrickmacross\/Castleblaney",
"3535677", "Kilkenny",
"3531", "Dublin",
"353420", "Dundalk\/Carrickmacross\/Castleblaney",
"353452", "Kildare",
"35397", "Belmullet",
"3534698", "Edenderry",
"3534699", "Navan\/Kells\/Trim\/Edenderry\/Enfield",
"3534369", "Granard",
"353571", "Portlaoise",
"3534368", "Granard",
"353570", "Portlaoise",
"3534496", "Castlepollard",
"353949285", "Castlebar",
"353719344", "Sligo",
"353451", "Naas\/Kildare\/Curragh",
"353450", "Naas\/Kildare\/Curragh",
"35394", "Castlebar\/Claremorris\/Castlerea\/Ballinrobe",
"353422", "Dundalk",
"353749900", "Letterkenny",
"353646701", "Killarney",
"353531203", "Gorey",
"3534695", "Enfield",
"353426", "Dundalk",
"35357850", "Portlaoise",
"353949288", "Castlebar",
"3534292", "Dundalk",
"3536670", "Tralee\/Dingle\/Killorglin\/Cahersiveen",
"35367", "Nenagh",
"353668", "Tralee\/Dingle\/Killorglin\/Cahersiveen",
"3534495", "Castlepollard",
"3534367", "Granard",
"3535793", "Tullamore",
"3539096", "Ballinasloe",
"353719330", "Sligo",
"353579901", "Portlaoise",
"353657", "Ennistymon",
"353423", "Dundalk\/Carrickmacross\/Castleblaney",
"3534799", "Monaghan\/Clones",
"3534696", "Enfield",
"35396", "Ballina",
"35371932", "Sligo",
"353425", "Castleblaney",
"35352", "Clonmel\/Cahir\/Killenaule",
"3534694", "Trim",
"35344", "Mullingar",
"35390650", "Athlone",
"353505", "Roscrea",
"3539496", "Castlerea",
"353539903", "Gorey",
"3536697", "Killorglin",
"35371930", "Sligo",
"353655", "Ennis",
"3532141", "Kinsale",
"353578510", "Portlaoise",
"353949289", "Castlebar",
"353427", "Dundalk",
"353653", "Ennis",
"3534691", "Navan",
"35398", "Westport",
"353218", "Cork\/Kinsale\/Coachford",
"353491", "Cavan\/Cootehill\/Oldcastle\/Belturbet",
"353621", "Tipperary\/Cashel",
"353616", "Scariff",
"353569900", "Kilkenny",
"353652", "Ennis",
"353620", "Tipperary\/Cashel",
"353490", "Cavan\/Cootehill\/Oldcastle\/Belturbet",
"3536699", "Tralee\/Dingle\/Killorglin\/Cahersiveen",
"3537198", "Manorhamilton",
"3535986", "Athy",
"3534491", "Tyrellspass",
"3536698", "Killorglin",
"353719332", "Sligo",
"353474", "Clones",
"353949287", "Castlebar",
"353719334", "Sligo",
"3539495", "Ballinrobe",
"3535291", "Killenaule",
"35374960", "Letterkenny",
"3535997", "Muine\ Bheag",
"35390", "Athlone\/Ballinasloe\/Portumna\/Roscommon",
"353656", "Ennis",
"353514", "New\ Ross",
"35322", "Mallow",
"353478", "Monaghan",
"353719010", "Sligo",
"35351999", "Waterford\/Carrick\-on\-Suir\/New\ Ross\/Kilmacthomas",};

    sub new {
      my $class = shift;
      my $number = shift;
      $number =~ s/(^\+353|\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;