// types.ts
export interface NewsCategory {
  id: string;
  name: string;
}

export interface NewsTag {
  id: string;
  name: string;
}

export interface NewsType {
  id: string;
  title: string;
  content: string;
  image?: string;
  category?: NewsCategory;
  tags?: NewsTag[];
  createdAt?: string;
}

export interface NewsAll {
  status: boolean;
  data: {
    links: {
      previous: string;
      next: string;
    };
    total_items: number;
    total_pages: number;
    page_size: number;
    current_page: number;
    results: {
      id: number;
      title: string;
      title_ru: string;
      image: string;
      text: string;
      text_ru: string;
      is_public: true;
      category: {
        name: string;
        name_ru: string;
      };
      tag: {
        id: number;
        name: string;
        name_ru: string;
      }[];
      post_images: {
        image: string;
        text: string;
        text_ru: string;
      }[];
    }[];
  };
}

export interface GetAllNewsCategory {
  status: boolean;
  data: {
    links: {
      previous: string;
      next: string;
    };
    total_items: number;
    total_pages: number;
    page_size: number;
    current_page: number;
    results: [
      {
        id: number;
        name: string;
      },
    ];
  };
}

export interface GetDetailNewsCategory {
  status: boolean;
  data: {
    id: number;
    name: string;
    name_ru: string;
    name_uz: string;
  };
}

export interface NewsDetail {
  status: boolean;
  data: {
    id: number;
    title: string;
    title_ru: string;
    title_uz: string;
    image: string;
    text: string;
    text_ru: string;
    text_uz: string;
    is_public: boolean;
    category: { id: number; name: string; name_ru: string; name_uz: string };
    post_tags: [
      {
        id: number;
        name: string;
        name_ru: string;
        name_uz: string;
      },
    ];
    post_images: [
      {
        image: string;
        text: string;
        text_ru: string;
        text_uz: string;
      },
    ];
  };
}
