import type { CSSProperties } from 'react'; import { formatDate, formatRial } from '../lib/utils'; import { FilesServiceSuccess, FilesServiceMore } from './icons/FilesServiceIcons'; export interface SessionPaymentEntry { uuid: string; method: string; amount_rials: number; paid_at?: number; created_by_name?: string | null; } export interface SessionCardData { uuid: string; services?: Array<{ service_name?: string; name?: string; line_total_rials?: number; price_rials?: number; quantity?: number }>; visit_price_rials?: number; services_total_rials?: number; session_at?: number | null; doctor_name?: string | null; final_price_rials?: number; patient_debt_rials?: number; is_paid?: boolean; invoice_uuid?: string | null; notes?: string | null; created_at?: number; // تسویه چندتکه + تخفیف (backend session settlement fields) discount_type?: 'percent' | 'fixed' | null; discount_value?: number; discount_rials?: number; applied_discount_rule_label?: string | null; paid_total_rials?: number; paid_at?: number | null; payments?: SessionPaymentEntry[]; } /** label:value row inside the service card (mirrors tauri ServiceInfoRow). */ function Row({ label, value, valueStyle }: { label: string; value: string; valueStyle?: CSSProperties }) { return (