@salla.sa/twilight-components
Version:
Salla Web Component
37 lines (36 loc) • 896 B
TypeScript
export interface City {
id: number;
name: string;
name_en?: string;
is_selected: boolean;
}
export type OptionType = 'city' | 'branch';
export interface SelectedOption {
id: number;
name: string;
}
/** Labels for city selector and modal; message text comes from BE */
export interface DeliveryPromiseLabels {
deliveryTo: string;
pickupFromBranch: string;
noResults: string;
selectCity: string;
changeCityTitle: string;
changeCitySubtitle: string;
cityFieldLabel: string;
modalSearchPlaceholder: string;
confirmAddress: string;
errorDeliveryPromise: string;
errorPickupPromise: string;
}
/** BE returns a pre-formatted message; FE displays it only */
export interface DeliveryPromiseResponse {
status: number;
success: boolean;
data: {
message: string;
};
error?: {
message?: string;
};
}