import { File } from "./file.js";
export type StaticAstroFile = File;
/**
* Creates a static Astro component file
*
* @example
* // Create an Astro component file with content
* const header = await StaticAstroFile("Header.astro",
* `---
* import Logo from '../components/Logo.astro';
* const navItems = ['Home', 'About', 'Contact'];
* ---
*
*
*
* `
* );
*/
export function StaticAstroFile(
id: string,
...args: [content: string] | [path: string, content: string]
): Promise {
const [path, content] = args.length === 1 ? [id, args[0]] : args;
return File(id, {
path,
content,
});
}