export interface SettingDefinition {
  id: number;
  setting_key: string;
  module: string;
  value_type: 'string' | 'integer' | 'decimal' | 'boolean' | 'json' | 'enum';
  default_value: any;
  allowed_values: string[] | null;
  scope: 'global' | 'company' | 'branch' | 'user';
  label_ar: string;
  label_en: string;
  display_group: string;
  is_visible: boolean;
  requires_restart: boolean;
}

export interface SettingValue {
  definition: SettingDefinition;
  current_value: any;
}

export interface UpdateSetting {
  setting_key: string;
  value: any;
  branch_id?: number | null;
  user_id?: number | null;
}

// Keep old interface for backward compatibility with store
export interface Setting {
  id: number;
  setting_key: string;
  module: string;
  value_type: string;
  default_value: any;
  current_value: any;
  scope: string;
  label_ar: string;
  label_en: string;
  display_group: string;
  is_visible: boolean;
  requires_restart: boolean;
  allowed_values: string[] | null;
}
