14 lines
363 B
JavaScript
14 lines
363 B
JavaScript
import { filePath } from "../consts.mjs";
|
|
|
|
const { DialogV2 } = foundry.applications.api;
|
|
const { renderTemplate } = foundry.applications.handlebars;
|
|
|
|
export async function promptViaTemplate(title, template, context = {}) {
|
|
const content = await renderTemplate(filePath(template), context);
|
|
return DialogV2.input({
|
|
window: {
|
|
title,
|
|
},
|
|
content,
|
|
});
|
|
};
|