import { ChangeDetectionStrategy, Component, computed, input, } from '@angular/core'; import { PiIconComponent, PiTextColorDirective, PiTextLargeDirective, PiTextWeightBoldDirective, } from '@pi/ui'; import type { Locale } from '../core/api'; import type { PublicService } from '../core/api.types'; import type { Copy } from '../core/copy'; import { resolveIcon } from '../core/icons'; import { ContactCta } from './contact-cta'; import { ProjectCard } from './project-card'; import { TestimonialCard } from './testimonial-card'; import { TechnologyChip } from './technology-chip'; /** * A service on its own address, and the published work that backs it: the * projects it was delivered on and what the people it was for said. * * The description comes from a textarea, so it is printed as text with its * line breaks kept. */ @Component({ selector: 'app-service-detail', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ ContactCta, PiIconComponent, PiTextColorDirective, PiTextLargeDirective, PiTextWeightBoldDirective, ProjectCard, TestimonialCard, TechnologyChip, ], styleUrl: './service-detail.scss', template: `

{{ copy().service.eyebrow }}

{{ service().title }}

@if (service().tagline; as tagline) {

{{ tagline }}

}
@if (service().description; as description) {

{{ description }}

} @if ((service().projects ?? []).length > 0) {

{{ copy().service.projects }}

@for (project of service().projects; track project.id) { }
} @if ((service().testimonials ?? []).length > 0) {

{{ copy().service.testimonials }}

@for ( testimonial of service().testimonials; track testimonial.id ) { }
}
`, }) export class ServiceDetail { readonly service = input.required(); readonly copy = input.required(); readonly locale = input.required(); /** The panel lets anyone type anything here, emoji included. */ protected readonly icon = computed(() => resolveIcon(this.service().icon, 'support'), ); }