export interface SessionType {
  id: string;
  addresses: Addresses[];
  default_address: Addresses;
  email: string;
  image: string;
  is_active: boolean;
  is_banned: boolean;
  is_suspended: boolean;
  is_verified: boolean;
  name: string;
  phone: string;
  phone_code: string;
  role: string;
  token: string;
  settings: {
    language: string;
    allow_notifications: boolean;
  };
  type: string;
  user_type: string;
}

export type AuthStage =
  | ""
  | "change_phone"
  | "verify_email"
  | "locationData"
  | "location";

export interface MetadataProps {
  title: string;
  description: string;
  keywords: string;
  alternates?: { canonical: string };
  openGraph?: {
    title: string;
    description: string;
    type: string;
    url: string;
    images: {
      url: string;
      alt: string;
    }[];
  };
}

export interface GenerateMetadataProps {
  endpoint: string;
  general?: boolean;
}
export interface banner {
  name: string;
  description: string;
  image: string;
  is_active: boolean;
  counts: { user_count: number };
}
export interface CategoriesProps {
  id: string;
  name: string;
  description: string;
  image: string;
}
export interface products {
  id: string;
  name: string;
  description: string;
  image: string;
  category: {
    id: string;
    name: string;
  };
  price: string;
  number_of_sold_item: number;
  flower_age_from: number;
  flower_age_to: number;
}

export interface Addresses {
  id: string;
  location: {
    country: {
      id: string;
      name: string;
    };
    city: {
      id: string;
      name: string;
    };
    district: {
      id: string;
      name: string;
    };
    longitude: number;
    latitude: number;
  };
  description: string;
  contact: {
    phone_code: string;
    phone: string;
  };
  is_default: boolean;
}

export interface Notification {
  id: string;
  icon: string;
  created_time: any;
  created_at: any;
  read_at: string;
  is_readed: boolean;
  sender_data: string;
  notify_type: string;
  title: any;
  link: string;
  body: any;
  order_id: string | null;
}
export interface Cart {
  id: number;
  type: string;
  product: products;
  amount: number;
  price: string;
  total: number;
}

export interface Message {
  id: number;
  message: string;
  message_type: "text" | "image" | "video" | "file";
  created_at: number | string;
  user?: {
    id: number;
    full_name: string;
    image?: string;
    user_type: "coach" | "client";
  };
}
export interface CheckoutFormValues {
  date: string;
  shipping_time: string;
  notes: string;
  occasion: string;
  card_number: string;
  card_name: string;
  expiry_date: string;
  cvv: string;
}

export interface Orders {
  id: string;
  order_number: string;
  status: string;
  status_label: string;
  address: {
    id: string;
    location: {
      country: { name: string };
      city: { name: string };
      district: { name: string };
      longitude: string;
      latitude: string;
    };
    description: string;
    contact: string;
  };
  items: {
    id: number;
    product: {
      id: number;
      name: string;
      description: string;
      image: string;
    };
    amount: number;
    price: string;
    total_price: string;
  }[];
  price: string;
  shipping_price: string;
  tax_amount: string;
  total_price: string;
  arrive_date_time: string;
  occasion: string;
  notes: string;
}

export interface Subscriptions {
  id: string;
  name: string;
  username: string;
  phone: string;
  phone_code: string;
  arrival_time: string;
  price: string;
  tax_amount: string;
  start_date: string;
  end_date: string;
  status: string;
  is_active: any;
  subscription: {
    id: string;
    name: string;
    description: string;
    price: string;
    period: number;
    period_formatted: string;
    is_active: boolean;
  };
  product: {
    id: string;
    name: string;
    description: string;
    image: string;
    category: {
      id: string;
      name: string;
    };
    price: string;
    number_of_sold_item: number;
    flower_age_from: number;
    flower_age_to: number;
  };
  address: {
    id: string;
    location: {
      country: {
        id: string;
        name: string;
      };
      city: {
        id: string;
        name: string;
      };
      district: {
        id: string;
        name: string;
      };
      longitude: string;
      latitude: string;
    };
    description: string;
    contact: {
      phone_code: string;
      phone: string;
    };
    is_default: boolean;
  };
}
export interface Subscription {
  id: string;
  name: string;
  description: string;
  price: string;
  period: number;
  period_formatted: string;
  is_active: boolean;
  products: {
    id: number;
    name: string;
    description: string;
    image: string;
    category: {
      id: number;
      name: string;
    };
    price: string;
    number_of_sold_item: number;
    flower_age_from: number;
    flower_age_to: number;
  }[];
}
export interface StaticPages {
  id: string;
  type: string;
  title: string;
  image: string;
  content: string;
  sub_sections: {
    id: number;
    is_active: boolean;
    static_page_id: number;
    key: string;
    value: string;
    sort_order: number;
    image: string;
    type: string;
    en: {
      key: string;
      value: string;
    };
    ar: {
      key: string;
      value: string;
    };
  }[];
  is_active: boolean;
}
