// Shared app-wide types

// TypeScript descriptors for the form schema

export interface StepDescriptor {
	id: string
	order: number
	title: string
	pricing?: PricingDescriptor[]
	next?: string | null
	prev?: string | null
}

export interface PricingDescriptor {
	amountCHF: number
	condition?: Record<string, unknown>
	perItem?: string
	perAttachment?: boolean
	perExtraAttachmentAfter?: number
}

export type EmployTypeValue = 'EMPLOYED' | 'SELF_EMPLOYED' | 'PENSIONER' | 'UNEMPLOYED'


export interface SimpleAttachmentData {
	comments: string
	attachments: string[]
}


export interface IncomeData {
	employType: EmployTypeValue | null
	attachments: {
		salaryCertificate: SimpleAttachmentData
		accountingDocuments: SimpleAttachmentData
		avsCertificate: SimpleAttachmentData
		lppCertificate: SimpleAttachmentData
		unemploymentCertificate: SimpleAttachmentData
	}
}

