import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';
import { BabylonLinkTypeDirective } from '../../../../directives/link-type/link-type.directive';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
const mapListRoomsItems = (items) => {
    return items.map((item) => ({
        ...item,
        image: item.image && !Array.isArray(item.image)
            ? [item.image]
            : item.image,
        link: item.link && !Array.isArray(item.link) ? [item.link] : item.link,
    }));
};
export class ListRoomsComponent {
    get normalizedItems() {
        const source = this.multimedia?.imagenes || this.items || [];
        return source.map((item) => {
            const isImageI = 'img' in item || 'src' in item;
            return {
                src: isImageI
                    ? item.img?.src || item.src
                    : item.images?.[0]?.src,
                alt: isImageI
                    ? item.img?.alt || item.alt
                    : item.images?.[0]?.alt,
                title: isImageI ? item.title : item.texts?.name,
                pretitle: isImageI ? item.pretitle : undefined,
                subtitle: isImageI ? item.subtitle : undefined,
                description: isImageI
                    ? item.description
                    : item.texts?.description,
                buttons: item.buttons,
                links: item.links,
            };
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ListRoomsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: ListRoomsComponent, isStandalone: true, selector: "ces-list-rooms", inputs: { links: "links", items: "items", multimedia: "multimedia", identifier: "identifier" }, ngImport: i0, template: "<section class=\"mdl-h05\" [id]=\"identifier ?? 'C4ListC2ImgTxtC'\">\n    <div class=\"mdl-container\">\n        <div class=\"m-top\">\n            @if (links?.length) {\n                <a\n                    [href]=\"links?.[0]?.url\"\n                    [linkType]=\"links?.[0]?.linkType\"\n                    class=\"m-button-clean\"\n                    [title]=\"links?.[0]?.label\"\n                >\n                    {{ links?.[0]?.label }}\n                    <svg\n                        width=\"50\"\n                        height=\"6\"\n                        viewBox=\"0 0 50 6\"\n                        fill=\"none\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                    >\n                        <path\n                            d=\"M45.875 0L49.875 2.8L45.875 5.6V0Z\"\n                            fill=\"#B7985D\"\n                        />\n                        <path\n                            d=\"M48.875 2.80078H0.375\"\n                            stroke=\"#B7985D\"\n                            stroke-width=\"0.75\"\n                            stroke-linecap=\"round\"\n                        />\n                    </svg>\n                </a>\n            }\n        </div>\n\n        @if (normalizedItems.length) {\n            <div class=\"m-bottom\">\n                @for (item of normalizedItems; track $index) {\n                    <a class=\"m-item\">\n                        <div class=\"m-imagen\">\n                            <a\n                                class=\"img-link\"\n                                [href]=\"\n                                    item.links?.[0]?.url ||\n                                    item.buttons?.[0]?.url\n                                \"\n                                [title]=\"item.links?.[0]?.label || item.title\"\n                                [linkType]=\"\n                                    item.links?.[0]?.linkType ||\n                                    item.buttons?.[0]?.linkType\n                                \"\n                            >\n                                <img [src]=\"item.src\" [alt]=\"item.alt\" />\n                            </a>\n                        </div>\n                        <div class=\"m-titulo-wrap\">\n                            @if (item.pretitle) {\n                                <p class=\"m-pretitulo\">{{ item.pretitle }}</p>\n                            }\n                            <h4 class=\"m-titulo\">\n                                {{ item.title }}\n                            </h4>\n                            @if (item.subtitle) {\n                                <p class=\"m-subtitulo\">{{ item.subtitle }}</p>\n                            }\n                            @if (item.description) {\n                                <p class=\"m-descripcion\">\n                                    {{ item.description }}\n                                </p>\n                            }\n                            <div class=\"m-line\"></div>\n                            @if (item.buttons?.length) {\n                                @for (item of item.buttons; track $index) {\n                                    <button\n                                        role=\"button\"\n                                        [ngClass]=\"{\n                                            'm-button': $index % 2 === 0,\n                                            'm-underline': $index % 2 !== 0,\n                                        }\"\n                                        [href]=\"item.url\"\n                                        [title]=\"item.label\"\n                                        [linkType]=\"item.linkType\"\n                                    >\n                                        {{ item.label }}\n                                    </button>\n                                }\n                            }\n                        </div>\n                    </a>\n                }\n            </div>\n        }\n    </div>\n</section>\n", styles: ["@charset \"UTF-8\";.m-swiper-button{width:3.9rem;height:3.9rem;display:flex;align-items:center;justify-content:center;transition:.3s}.m-swiper-button.fill{border:1px solid #b7985d}.m-swiper-button.fill:hover{background-color:#b7985d;transition:.3s}.m-swiper-button.fill:hover svg{filter:brightness(250%)}.m-button{font-family:josefinsans,sans-serif!important;font-weight:400!important;font-size:1.6rem;line-height:100%!important;letter-spacing:4%!important;text-transform:uppercase!important;border:1px solid #b7985d;padding:1.2rem 4.6rem .6rem;color:#b7985d;transition:.3s}.m-button:hover{background-color:#b7985d;transition:.3s;color:#fff}.m-button-clean{font-family:josefinsans,sans-serif!important;font-weight:400!important;font-size:1.6rem;line-height:100%!important;letter-spacing:4%!important;text-transform:uppercase!important;font-size:1.3rem;color:#b7985d;display:flex;gap:2.5rem;white-space:nowrap;align-items:center}.m-button-clean svg{transition:clip-path .3s ease;clip-path:polygon(0% 0%,100% 0%,100% 100%,0% 100%)}.m-button-clean:hover{transition:.3s;color:#9d793f}.m-button-clean:hover svg{clip-path:polygon(30% 0%,100% 0%,100% 100%,30% 100%)}.m-button-clean:hover svg path{color:#9d793f;fill:#9d793f}.m-underline{font-family:josefinsans,sans-serif!important;font-weight:400!important;font-size:1.6rem;line-height:100%!important;letter-spacing:4%!important;text-transform:uppercase!important;text-decoration:underline;padding:1.2rem 4.6rem .6rem;color:#b7985d;transition:.3s;font-size:1.4rem}.m-underline:hover{text-decoration:none;transition:.3s}.img-link{width:100%;height:100%}html{font-size:62.5%;overflow-x:hidden}html.overflow-hidden{overflow:hidden}html body{font:14px \"\"}@media (min-width: 1921px) and (max-height: 600px){html{font-size:55.5%}}html a{text-decoration:none}h1,h2,h3,h4,h5,h6{all:unset;display:revert}.fancybox__container{background-color:#0000!important}section .mdl-container{width:100%;max-width:160rem;margin:0 auto}.w100{font-weight:100}.w300{font-weight:300}.w400{font-weight:400}.w500{font-weight:medium}.w600{font-weight:600}.w700{font-weight:700}.w900{font-weight:900}.italic{font-style:italic}.row{display:flex;flex-direction:row}.col{display:flex;flex-direction:column}html{overflow-x:hidden}body{cursor:default;overflow-x:hidden;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{color:inherit;border:0;margin:0;padding:0}a{text-size-adjust:none;-webkit-text-size-adjust:none;text-decoration:none;cursor:pointer}ul{list-style-position:outside}li{padding-left:3rem;list-style:none;position:relative}li:before{content:\"\\25cf\";position:absolute;top:0;left:0}button,mark{background:none}button,label{cursor:pointer}:focus{outline:none!important}::-moz-focus-inner{border:0}summary::-webkit-details-marker{display:none}button,input[type=submit],input[type=text]{-webkit-appearance:none}h1,h2,h3,h4,h5,h6{text-transform:none}p{width:100%}img{width:auto;height:auto;object-fit:contain}@-webkit-keyframes swingV{15%{-webkit-transform:translateY(.5rem);transform:translateY(.5rem)}30%{-webkit-transform:translateY(-.5rem);transform:translateY(-.5rem)}50%{-webkit-transform:translateY(.3rem);transform:translateY(.3rem)}65%{-webkit-transform:translateY(-.3rem);transform:translateY(-.3rem)}80%{-webkit-transform:translateY(.2rem);transform:translateY(.2rem)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes swingV{15%{-webkit-transform:translateY(.5rem);transform:translateY(.5rem)}30%{-webkit-transform:translateY(-.5rem);transform:translateY(-.5rem)}50%{-webkit-transform:translateY(.3rem);transform:translateY(.3rem)}65%{-webkit-transform:translateY(-.3rem);transform:translateY(-.3rem)}80%{-webkit-transform:translateY(.2rem);transform:translateY(.2rem)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes swingH{15%{-webkit-transform:translateX(.5rem);transform:translate(.5rem)}30%{-webkit-transform:translateX(-.5rem);transform:translate(-.5rem)}50%{-webkit-transform:translateX(.3rem);transform:translate(.3rem)}65%{-webkit-transform:translateX(-.3rem);transform:translate(-.3rem)}80%{-webkit-transform:translateX(.2rem);transform:translate(.2rem)}to{-webkit-transform:translateX(0);transform:translate(0)}}@keyframes swingH{15%{-webkit-transform:translateX(.5rem);transform:translate(.5rem)}30%{-webkit-transform:translateX(-.5rem);transform:translate(-.5rem)}50%{-webkit-transform:translateX(.3rem);transform:translate(.3rem)}65%{-webkit-transform:translateX(-.3rem);transform:translate(-.3rem)}80%{-webkit-transform:translateX(.2rem);transform:translate(.2rem)}to{-webkit-transform:translateX(0);transform:translate(0)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:#ffffff;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px #23232329}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.m-titulo-wrap{width:34.9rem;max-width:100%;margin:0 auto;display:flex;flex-direction:column;align-items:center;text-align:center;gap:3rem}.mdl-h05{padding:3rem 1.4rem 0}.mdl-h05 .mdl-container{max-width:71rem}.mdl-h05 .mdl-container .m-top{margin-bottom:2.5rem}.mdl-h05 .mdl-container .m-bottom{display:flex;gap:1.2rem;flex-wrap:wrap;justify-content:center}.mdl-h05 .mdl-container .m-bottom .m-item{display:flex;flex-direction:column;gap:3rem;align-items:center;margin-bottom:7rem}.mdl-h05 .mdl-container .m-bottom .m-item .m-imagen{width:34.9rem;height:34.9rem}.mdl-h05 .mdl-container .m-bottom .m-item .m-imagen img{width:100%;height:100%;object-fit:cover}.mdl-h05 .mdl-container .m-bottom .m-item .m-line{height:.1rem;width:2.8rem;background-color:#b7985d}.mdl-h05 .mdl-container .m-bottom .m-item .m-titulo{font-family:josefinsans,sans-serif;font-weight:400;font-size:2rem;line-height:2.4rem;text-transform:uppercase;color:#b7985d}@media (max-width: 737px){.mdl-h05 .mdl-container .m-top{width:100%;display:flex;justify-content:center}.mdl-h05 .mdl-container .m-top .m-button-clean{width:23rem;white-space:wrap;align-items:flex-end;gap:0;margin-right:-3rem}.mdl-h05 .mdl-container .m-top .m-button-clean svg{margin-bottom:.7rem}}\n"], dependencies: [{ kind: "directive", type: BabylonLinkTypeDirective, selector: "[linkType]", inputs: ["linkType", "href", "modalClick", "clickPopup", "disablePointerNone"], outputs: ["anchorClicked"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ListRoomsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ces-list-rooms', standalone: true, imports: [BabylonLinkTypeDirective, CommonModule], template: "<section class=\"mdl-h05\" [id]=\"identifier ?? 'C4ListC2ImgTxtC'\">\n    <div class=\"mdl-container\">\n        <div class=\"m-top\">\n            @if (links?.length) {\n                <a\n                    [href]=\"links?.[0]?.url\"\n                    [linkType]=\"links?.[0]?.linkType\"\n                    class=\"m-button-clean\"\n                    [title]=\"links?.[0]?.label\"\n                >\n                    {{ links?.[0]?.label }}\n                    <svg\n                        width=\"50\"\n                        height=\"6\"\n                        viewBox=\"0 0 50 6\"\n                        fill=\"none\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                    >\n                        <path\n                            d=\"M45.875 0L49.875 2.8L45.875 5.6V0Z\"\n                            fill=\"#B7985D\"\n                        />\n                        <path\n                            d=\"M48.875 2.80078H0.375\"\n                            stroke=\"#B7985D\"\n                            stroke-width=\"0.75\"\n                            stroke-linecap=\"round\"\n                        />\n                    </svg>\n                </a>\n            }\n        </div>\n\n        @if (normalizedItems.length) {\n            <div class=\"m-bottom\">\n                @for (item of normalizedItems; track $index) {\n                    <a class=\"m-item\">\n                        <div class=\"m-imagen\">\n                            <a\n                                class=\"img-link\"\n                                [href]=\"\n                                    item.links?.[0]?.url ||\n                                    item.buttons?.[0]?.url\n                                \"\n                                [title]=\"item.links?.[0]?.label || item.title\"\n                                [linkType]=\"\n                                    item.links?.[0]?.linkType ||\n                                    item.buttons?.[0]?.linkType\n                                \"\n                            >\n                                <img [src]=\"item.src\" [alt]=\"item.alt\" />\n                            </a>\n                        </div>\n                        <div class=\"m-titulo-wrap\">\n                            @if (item.pretitle) {\n                                <p class=\"m-pretitulo\">{{ item.pretitle }}</p>\n                            }\n                            <h4 class=\"m-titulo\">\n                                {{ item.title }}\n                            </h4>\n                            @if (item.subtitle) {\n                                <p class=\"m-subtitulo\">{{ item.subtitle }}</p>\n                            }\n                            @if (item.description) {\n                                <p class=\"m-descripcion\">\n                                    {{ item.description }}\n                                </p>\n                            }\n                            <div class=\"m-line\"></div>\n                            @if (item.buttons?.length) {\n                                @for (item of item.buttons; track $index) {\n                                    <button\n                                        role=\"button\"\n                                        [ngClass]=\"{\n                                            'm-button': $index % 2 === 0,\n                                            'm-underline': $index % 2 !== 0,\n                                        }\"\n                                        [href]=\"item.url\"\n                                        [title]=\"item.label\"\n                                        [linkType]=\"item.linkType\"\n                                    >\n                                        {{ item.label }}\n                                    </button>\n                                }\n                            }\n                        </div>\n                    </a>\n                }\n            </div>\n        }\n    </div>\n</section>\n", styles: ["@charset \"UTF-8\";.m-swiper-button{width:3.9rem;height:3.9rem;display:flex;align-items:center;justify-content:center;transition:.3s}.m-swiper-button.fill{border:1px solid #b7985d}.m-swiper-button.fill:hover{background-color:#b7985d;transition:.3s}.m-swiper-button.fill:hover svg{filter:brightness(250%)}.m-button{font-family:josefinsans,sans-serif!important;font-weight:400!important;font-size:1.6rem;line-height:100%!important;letter-spacing:4%!important;text-transform:uppercase!important;border:1px solid #b7985d;padding:1.2rem 4.6rem .6rem;color:#b7985d;transition:.3s}.m-button:hover{background-color:#b7985d;transition:.3s;color:#fff}.m-button-clean{font-family:josefinsans,sans-serif!important;font-weight:400!important;font-size:1.6rem;line-height:100%!important;letter-spacing:4%!important;text-transform:uppercase!important;font-size:1.3rem;color:#b7985d;display:flex;gap:2.5rem;white-space:nowrap;align-items:center}.m-button-clean svg{transition:clip-path .3s ease;clip-path:polygon(0% 0%,100% 0%,100% 100%,0% 100%)}.m-button-clean:hover{transition:.3s;color:#9d793f}.m-button-clean:hover svg{clip-path:polygon(30% 0%,100% 0%,100% 100%,30% 100%)}.m-button-clean:hover svg path{color:#9d793f;fill:#9d793f}.m-underline{font-family:josefinsans,sans-serif!important;font-weight:400!important;font-size:1.6rem;line-height:100%!important;letter-spacing:4%!important;text-transform:uppercase!important;text-decoration:underline;padding:1.2rem 4.6rem .6rem;color:#b7985d;transition:.3s;font-size:1.4rem}.m-underline:hover{text-decoration:none;transition:.3s}.img-link{width:100%;height:100%}html{font-size:62.5%;overflow-x:hidden}html.overflow-hidden{overflow:hidden}html body{font:14px \"\"}@media (min-width: 1921px) and (max-height: 600px){html{font-size:55.5%}}html a{text-decoration:none}h1,h2,h3,h4,h5,h6{all:unset;display:revert}.fancybox__container{background-color:#0000!important}section .mdl-container{width:100%;max-width:160rem;margin:0 auto}.w100{font-weight:100}.w300{font-weight:300}.w400{font-weight:400}.w500{font-weight:medium}.w600{font-weight:600}.w700{font-weight:700}.w900{font-weight:900}.italic{font-style:italic}.row{display:flex;flex-direction:row}.col{display:flex;flex-direction:column}html{overflow-x:hidden}body{cursor:default;overflow-x:hidden;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{color:inherit;border:0;margin:0;padding:0}a{text-size-adjust:none;-webkit-text-size-adjust:none;text-decoration:none;cursor:pointer}ul{list-style-position:outside}li{padding-left:3rem;list-style:none;position:relative}li:before{content:\"\\25cf\";position:absolute;top:0;left:0}button,mark{background:none}button,label{cursor:pointer}:focus{outline:none!important}::-moz-focus-inner{border:0}summary::-webkit-details-marker{display:none}button,input[type=submit],input[type=text]{-webkit-appearance:none}h1,h2,h3,h4,h5,h6{text-transform:none}p{width:100%}img{width:auto;height:auto;object-fit:contain}@-webkit-keyframes swingV{15%{-webkit-transform:translateY(.5rem);transform:translateY(.5rem)}30%{-webkit-transform:translateY(-.5rem);transform:translateY(-.5rem)}50%{-webkit-transform:translateY(.3rem);transform:translateY(.3rem)}65%{-webkit-transform:translateY(-.3rem);transform:translateY(-.3rem)}80%{-webkit-transform:translateY(.2rem);transform:translateY(.2rem)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes swingV{15%{-webkit-transform:translateY(.5rem);transform:translateY(.5rem)}30%{-webkit-transform:translateY(-.5rem);transform:translateY(-.5rem)}50%{-webkit-transform:translateY(.3rem);transform:translateY(.3rem)}65%{-webkit-transform:translateY(-.3rem);transform:translateY(-.3rem)}80%{-webkit-transform:translateY(.2rem);transform:translateY(.2rem)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes swingH{15%{-webkit-transform:translateX(.5rem);transform:translate(.5rem)}30%{-webkit-transform:translateX(-.5rem);transform:translate(-.5rem)}50%{-webkit-transform:translateX(.3rem);transform:translate(.3rem)}65%{-webkit-transform:translateX(-.3rem);transform:translate(-.3rem)}80%{-webkit-transform:translateX(.2rem);transform:translate(.2rem)}to{-webkit-transform:translateX(0);transform:translate(0)}}@keyframes swingH{15%{-webkit-transform:translateX(.5rem);transform:translate(.5rem)}30%{-webkit-transform:translateX(-.5rem);transform:translate(-.5rem)}50%{-webkit-transform:translateX(.3rem);transform:translate(.3rem)}65%{-webkit-transform:translateX(-.3rem);transform:translate(-.3rem)}80%{-webkit-transform:translateX(.2rem);transform:translate(.2rem)}to{-webkit-transform:translateX(0);transform:translate(0)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:#ffffff;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px #23232329}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.m-titulo-wrap{width:34.9rem;max-width:100%;margin:0 auto;display:flex;flex-direction:column;align-items:center;text-align:center;gap:3rem}.mdl-h05{padding:3rem 1.4rem 0}.mdl-h05 .mdl-container{max-width:71rem}.mdl-h05 .mdl-container .m-top{margin-bottom:2.5rem}.mdl-h05 .mdl-container .m-bottom{display:flex;gap:1.2rem;flex-wrap:wrap;justify-content:center}.mdl-h05 .mdl-container .m-bottom .m-item{display:flex;flex-direction:column;gap:3rem;align-items:center;margin-bottom:7rem}.mdl-h05 .mdl-container .m-bottom .m-item .m-imagen{width:34.9rem;height:34.9rem}.mdl-h05 .mdl-container .m-bottom .m-item .m-imagen img{width:100%;height:100%;object-fit:cover}.mdl-h05 .mdl-container .m-bottom .m-item .m-line{height:.1rem;width:2.8rem;background-color:#b7985d}.mdl-h05 .mdl-container .m-bottom .m-item .m-titulo{font-family:josefinsans,sans-serif;font-weight:400;font-size:2rem;line-height:2.4rem;text-transform:uppercase;color:#b7985d}@media (max-width: 737px){.mdl-h05 .mdl-container .m-top{width:100%;display:flex;justify-content:center}.mdl-h05 .mdl-container .m-top .m-button-clean{width:23rem;white-space:wrap;align-items:flex-end;gap:0;margin-right:-3rem}.mdl-h05 .mdl-container .m-top .m-button-clean svg{margin-bottom:.7rem}}\n"] }]
        }], propDecorators: { links: [{
                type: Input
            }], items: [{
                type: Input
            }], multimedia: [{
                type: Input
            }], identifier: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 