import { Placeholders } from "../contracts/placeholders.type.mjs"; //#region ../ai/src/system-prompt/render-placeholders.d.ts /** * Render a template string against a placeholders map, supporting dot-path * lookups and inline fallback values. * * Supported syntax: * - `{{key}}` — replaced by `placeholders.key`, left untouched if missing. * - `{{a.b.c}}` — dot-path lookup into nested objects. * - `{{key|default}}` — substitutes `default` when the key resolves to * `undefined`, `null`, or empty string. * * Whitespace inside the braces is ignored (`{{ key }}` == `{{key}}`). * Values are coerced to strings via `String(value)`. * * @example * renderPlaceholders( * "Hello {{user.name|friend}}, your role is {{role}}", * { user: { name: "Hasan" }, role: "admin" }, * ); * // "Hello Hasan, your role is admin" * * @example * renderPlaceholders("Hello {{user.name|friend}}", {}); * // "Hello friend" */ declare function renderPlaceholders(template: string, placeholders?: Placeholders): string; //#endregion export { renderPlaceholders }; //# sourceMappingURL=render-placeholders.d.mts.map