import { description as tempDesctiption } from "@/config/default";
import { getGeneralSettings } from "@/models/settings";

export default async function manifest() {
  let description = await getGeneralSettings();

  if (!description) description = tempDesctiption;

  return {
    name: description.title,
    short_name: description.title,
    description: description.description,
    start_url: "/",
    display: "standalone",
    background_color: "#fff",
    theme_color: "#fff",
    icons: [
      {
        src: "/favicon.ico",
        sizes: "any",
        type: "image/x-icon",
      },
    ],
  };
}
