import { httpGetInterceptor } from "../http-config/http-interceptor-service";

export async function getHeroData() {
  return await httpGetInterceptor(`media/public/list?enablePage=1&sort=desc&sortBy=createdAt&size=5&page=0&typeId=1&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=`);
}

export async function getCategoryData() {
  return await httpGetInterceptor(`media/categories/list/publish?enablePage=1&sort=desc&sortBy=updatedAt&size=12&type=`);
}

export async function getListContent(props: any) {
  return await httpGetInterceptor(
    `media/public/list?enablePage=1&sort=desc&sortBy=${props.sortBy}&size=${props.size}&page=${props.page}&typeId=${props.contentTypeId}&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=`
  );
}

export async function getPrivacy() {
  return await httpGetInterceptor(`general/privacy-policy/1`);
}

export async function getIndeksData() {
  return await httpGetInterceptor(`blog/public/pagination?enablePage=1&page=0&size=20`);
}

export async function getDetail(slug: string) {
  return await httpGetInterceptor(`media/public?slug=${slug}&state=mabes`);
}