/**
 * Attribute Type Definitions
 */

export interface AttributeTerm {
  id: number;
  name: string;
  slug: string;
  count: number;
}

export interface Attribute {
  id: number;
  name: string;
  label: string;
  slug: string;
  type: 'select' | 'text';
  is_global: boolean;
  terms: AttributeTerm[];
  used_in_variations: number;
  values?: string[]; // Only for local attributes
}

export interface AttributesResponse {
  success: boolean;
  data: {
    attributes: Attribute[];
    total: number;
    global_count: number;
    local_count: number;
  };
}

export interface ConvertAttributeRequest {
  local_attribute: string;
  new_global_name: string;
}

export interface ConvertAttributeResponse {
  success: boolean;
  message: string;
  data: {
    processed_variations: number;
    created_terms: string[];
    new_taxonomy: string;
  };
}
