import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, signal } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { CalendarGridComponent } from '../calendar-grid/calendar-grid.component'; import { TimeWheelPickerComponent } from '../time-wheel-picker/time-wheel-picker.component'; import { TaskDate } from '../../models/kanban.types'; /** * DatePickerDialogComponent - Date and time picker * FuseBase style (Image 6) */ @Component({ selector: 'app-date-picker-dialog', standalone: true, imports: [CommonModule, FormsModule, CalendarGridComponent, TimeWheelPickerComponent], template: `
`, styles: [` .dialog-overlay { @apply fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50; } .dialog-content { @apply bg-[#2b2b2b] rounded-lg shadow-2xl p-6 w-[480px] max-w-[90vw] space-y-4; } .time-picker-section { @apply pt-4 border-t border-gray-700; } .time-display { @apply text-4xl font-bold text-blue-400 text-center mb-4; } .time-wheels { @apply flex items-center justify-center gap-2; } .time-separator { @apply text-3xl font-bold text-blue-400; } .when-section { @apply pt-4 border-t border-gray-700; } .when-row { @apply flex justify-between items-center; } .when-label { @apply text-sm font-medium text-gray-400; } .when-value { @apply text-sm text-white; } .toggle-row { @apply flex justify-between items-center py-2; } .toggle-label { @apply text-sm font-medium text-gray-300; } .toggle-btn { @apply relative w-12 h-6 bg-gray-600 rounded-full transition-colors; } .toggle-btn-active { @apply bg-blue-600; } .toggle-slider { @apply absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full transition-transform; } .toggle-btn-active .toggle-slider { @apply translate-x-6; } .alert-section { @apply flex justify-between items-center; } .alert-label { @apply text-sm font-medium text-gray-300; } .alert-select { @apply px-3 py-1.5 bg-[#3a3a3a] text-white rounded border border-gray-600 focus:border-blue-500 outline-none text-sm; } .dialog-actions { @apply flex gap-3 pt-4 border-t border-gray-700; } .btn-cancel { @apply flex-1 px-4 py-2.5 bg-gray-700 hover:bg-gray-600 text-white rounded-lg transition-colors font-medium; } .btn-done { @apply flex-1 px-4 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors font-medium; } :host-context(.light-theme) { .dialog-content { @apply bg-white; } .time-picker-section, .when-section, .dialog-actions { @apply border-gray-200; } .when-label, .toggle-label, .alert-label { @apply text-gray-700; } .when-value { @apply text-gray-900; } .toggle-btn { @apply bg-gray-300; } .alert-select { @apply bg-gray-50 text-gray-900 border-gray-300; } .btn-cancel { @apply bg-gray-200 hover:bg-gray-300 text-gray-900; } } `], changeDetection: ChangeDetectionStrategy.OnPush }) export class DatePickerDialogComponent { @Input() initialDate?: TaskDate; @Output() close = new EventEmitter