"use client"
import { Panel } from "@/app/interface/panel"
import { pick } from "@/lib/pick"
import { Grid } from "@/app/interface/grid"
export function Layout0() {
return (
)
}
export function Layout1() {
return (
)
}
export function Layout2_todo() {
return (
)
}
export function Layout3_todo() {
return (
)
}
export function Layout4_todo() {
return (
)
}
export function Layout2() {
return (
)
}
export function Layout3() {
return (
)
}
// squares + vertical
export function Layout4() {
return (
)
}
// squares + horizontal
export function Layout5() {
return (
)
}
// export const layouts = { Layout1, Layout2_todo, Layout3_todo, Layout4_todo, Layout2, Layout3 }
export const allLayouts = {
random: <>>,
Layout0,
Layout1,
Layout2,
Layout3,
Layout4
}
export const allLayoutLabels = {
random: "Random layout",
Layout0: "Grid 0",
Layout1: "Grid 1",
Layout2: "Grid 2",
Layout3: "Grid 3",
// Layout4: "Blocks 1",
}
// note for reference: A4 (297mm x 210mm)
export const allLayoutAspectRatios = {
Layout0: "aspect-[250/297]",
Layout1: "aspect-[250/297]",
Layout2: "aspect-[250/297]",
Layout3: "aspect-[250/297]",
// Layout4: "aspect-[1/3]",
}
export type LayoutName = keyof typeof allLayouts
export const defaultLayout: LayoutName = "Layout1"
export type LayoutCategory = "square" | "fluid"
export const nonRandomLayouts = Object.keys(allLayouts).filter(layout => layout !== "random")
export const getRandomLayoutName = (): LayoutName => {
return pick(nonRandomLayouts) as LayoutName
}
export function getRandomLayoutNames(): LayoutName[] {
return nonRandomLayouts.sort(() => Math.random() - 0.5) as LayoutName[]
}