From 31643100cebc635bf7af763292a33654039f7613 Mon Sep 17 00:00:00 2001 From: sergiotarxz Date: Thu, 21 Dec 2023 10:05:04 +0100 Subject: [PATCH] Adding ad Burguillos Dental. --- lib/BurguillosInfo/Ads/BurguillosDental.pm | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 lib/BurguillosInfo/Ads/BurguillosDental.pm diff --git a/lib/BurguillosInfo/Ads/BurguillosDental.pm b/lib/BurguillosInfo/Ads/BurguillosDental.pm new file mode 100644 index 0000000..7743419 --- /dev/null +++ b/lib/BurguillosInfo/Ads/BurguillosDental.pm @@ -0,0 +1,65 @@ +package BurguillosInfo::Ads::BurguillosDental; + +use v5.36.0; + +use strict; +use warnings; +use utf8; + +use feature 'signatures'; + +use Moo; + +use parent 'BurguillosInfo::Ad'; + +sub id ($self) { + return 'burguillos-dental'; +} + +sub weight { + return 50; +} + +sub max_alternative { + return 3; +} + +sub seconds($self) { + return 15; +} + +sub default_alternative($self) { + return int($self->alternative * ($self->max_alternative + 1)); +} + +sub is_active ($self) { + return 1; +} + +sub img ($self) { + if ( $self->default_alternative == 2 ) { + return '/img/burguillos-dental-ad-0-small.webp' + } + if ( $self->default_alternative == 1 ) { + return '/img/burguillos-dental-ad-1-small.webp' + } + return '/img/burguillos-dental-ad-1-small.webp' +} + +sub text($self) { + if ( $self->default_alternative == 2 ) { + return 'Pide presupuesto para conseguir una sonrisa perfecta en Burguillos Dental, '. + 'ubicado en Centro Médico Juan Manuel Pérez Sanchez.'; + } + if ( $self->default_alternative == 1 ) { + return '¿Te has hecho ya tu limpieza completa de boca anual? Confia en profesionales, confia en Burguillos Dental, '. + 'ubicado en Centro Médico Juan Manuel Pérez Sanchez.'; + } + return '¿Te duele un diente? No lo dejes, ven a Burguillos Dental '. + 'ubicado en Centro Médico Juan Manuel Pérez Sanchez.'; +} + +sub href { + return '/posts/burguillos-dental?come-from-ad=1'; +} +1;