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AAA,GAAAA,MAAA,OAAAA,MAAA,KAAA4C,EAAAtB,qBAILtB,MAAA,GAAAA,MAAA,cAAAA,MAAA,MAAA4C,EAAA5B,0BCVtBoC,KAAMC,KAAYC,KAAOC,IAAkBC,KAAWlF,GAAqBmF,cAAA,KAwBjFC,QAAA,IADLC,QAAc1C,EAAA2C,UAAA","sources":["./src/app/layout/fresh/components/footer/footer-height.directive.ts","./src/app/layout/fresh/components/footer/footer.component.html","./src/app/layout/fresh/components/footer/footer.component.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef } from '@angular/core';\n\n@Directive({\n  selector: '[appFooterHeight]',\n  standalone: true\n})\nexport class FooterHeightDirective implements AfterViewInit {\n  constructor(\n    private elRef: ElementRef<HTMLElement>,\n  ) {}\n\n  ngAfterViewInit(): void {\n    const pageEl = document.querySelector<HTMLElement>(\".page\");\n\n    if(!pageEl){return}\n\n    const observer = new IntersectionObserver((entries) => {\n      entries.forEach(entry => {\n        const visibleHeight = entry.intersectionRect.height;\n        pageEl.style.setProperty(\"--footer-height\", visibleHeight + 'px');\n      });\n    }, {\n      threshold: Array.from({ length: 20 }, (_, i) => i * 0.05) // Пороги срабатывания\n    });\n\n    observer.observe(this.elRef.nativeElement)\n  }\n}\n\n","<div class=\"footer\" [style.background]=\"footerColor$ | async\" appFooterHeight>\n  <div class=\"footer__inner l-wrapper\">\n    <ng-container >\n      <div class=\"footer__subtitle h4\" *ngIf=\"additionalAbout$ | async as additionalAbout\">\n        <a [routerLink]=\"['additional', additionalAbout.slug]\" class=\"link link--th-ctrl link--underline-in\" data-cy=\"about-link\">{{ additionalAbout.menuLabel }}</a>\n      </div>\n    </ng-container>\n\n    <div class=\"footer__social\" *ngIf=\"socialLinks$ | async as socialLinks\">\n      <div class=\"footer__social-wrap\">\n        <a href=\"{{ link.url }}\" *ngFor=\"let link of socialLinks\"\n           attr.aria-label=\"Navigate to {{ link.name }}\" i18n-aria-label>\n          <app-svg-icon\n            [icon]=\"link.name\"\n            [width]=\"'26'\"\n            [height]=\"'26'\"\n            [clickable]=\"true\"\n            [additionalClass]=\"'secondary-color'\"\n          ></app-svg-icon>\n        </a>\n      </div>\n    </div>\n\n    <div class=\"footer__subtitle small\" *ngIf=\"additionalPrivacy$ | async as additionalPrivacy\">\n      <a [routerLink]=\"['additional', additionalPrivacy.slug]\" class=\"link link--th-ctrl link--underline-in\" data-cy=\"privacy-link\" i18n=\"@@PrivacyPolicy\">Privacy policy</a>\n    </div>\n\n    <div class=\"footer__dev small\" *ngIf=\"(isIiko$ | async) !== null\">\n      <ng-container i18n=\"@@FooterCopyright\">Developed on the platform</ng-container>\n      {{ (isIiko$ | async) ? 'iiko' : 'Syrve' }}\n    </div>\n  </div>\n</div>\n\n<ng-template #metricView></ng-template>\n","import { AsyncPipe, NgFor, NgIf } from '@angular/common';\nimport { AfterViewInit, Component, ViewChild, ViewContainerRef } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { Observable } from 'rxjs';\n\nimport { select } from '@ngneat/elf';\nimport { SvgIconComponent } from '../../../../shared/components/svg-icon/svg-icon.component';\nimport { ConfigRepository } from '../../../../shared/repositories/config.repository';\nimport { SocialLink } from '../../../../api/v1/models/social-link';\nimport { SeparateTask } from '../../../../shared/utils/separate-task';\nimport { AdditionalPageShort } from '../../../../api/v1/models/additional-page-short';\nimport { FooterHeightDirective } from './footer-height.directive';\n\n@Component({\n    selector: 'app-footer',\n    templateUrl: './footer.component.html',\n    standalone: true,\n    imports: [NgIf, RouterLink, NgFor, SvgIconComponent, AsyncPipe, FooterHeightDirective]\n})\nexport class FooterComponent implements AfterViewInit {\n  constructor(\n    private configRepository: ConfigRepository,\n  ) {}\n\n  @ViewChild('metricView', { read: ViewContainerRef }) metricView: ViewContainerRef;\n\n  isIiko$: Observable<boolean | null> =  this.configRepository.isIiko$;\n  address$: Observable<string | undefined | null> =  this.configRepository.address$;\n  socialLinks$: Observable<SocialLink[] | null> =  this.configRepository.socialLinks$;\n\n  additionalAbout$: Observable<AdditionalPageShort | undefined> =  this.configRepository.additionalAbout$;\n  additionalPrivacy$: Observable<AdditionalPageShort | undefined> =  this.configRepository.additionalPrivacy$;\n\n  noOutlets$: Observable<boolean> = this.configRepository.outlets$.pipe(select(outlets => !outlets.length));\n  footerColor$: Observable<string | null> =  this.configRepository.footerColor$;\n\n  ngAfterViewInit(): void {\n    void this.loadMetric();\n  }\n\n  @SeparateTask()\n  async loadMetric(): Promise<void> {\n    this.metricView.clear();\n    const {MetricFooterComponent} = await import('../../../../components/metric-footer/metric-footer.component');\n    this.metricView.createComponent(MetricFooterComponent);\n  }\n}\n\n"],"names":["FooterHeightDirective","constructor","elRef","this","ngAfterViewInit","pageEl","document","querySelector","IntersectionObserver","entries","forEach","entry","style","setProperty","intersectionRect","height","threshold","Array","from","length","_","i","observe","nativeElement","static","t","i0","core","lG2","selectors","standalone","_c1","additionalAbout_r6","slug","menuLabel","link_r9","url","name","FooterComponent_div_6_a_2_Template","socialLinks_r7","additionalPrivacy_r10","ctx_r3","isIiko$","FooterComponent","configRepository","address$","socialLinks$","additionalAbout$","additionalPrivacy$","noOutlets$","outlets$","pipe","select","outlets","footerColor$","loadMetric","_this","_asyncToGenerator","metricView","clear","MetricFooterComponent","__webpack_require__","e","then","bind","createComponent","i1","Xpm","viewQuery","rf","ctx","ViewContainerRef","$localize","FooterComponent_div_4_Template","FooterComponent_div_6_Template","FooterComponent_div_8_Template","FooterComponent_div_10_Template","FooterComponent_ng_template_12_Template","NgIf","RouterLink","NgFor","SvgIconComponent","AsyncPipe","encapsulation","__decorate","SeparateTask","prototype"],"sourceRoot":"webpack:///"}