// -- Implementation ---------------------------------------------------------
export function Static(handler, optionsOrId, maybeId) {
    let options;
    let id;
    if (typeof optionsOrId === "string") {
        id = optionsOrId;
    }
    else {
        options = optionsOrId;
        id = maybeId ?? "";
    }
    return {
        __brand: "staticHandler",
        $$id: id,
        handler: handler,
        ...(options ? { options } : {}),
    };
}
// -- Type guard -------------------------------------------------------------
/**
 * Type guard to check if a value is a StaticHandlerDefinition.
 */
export function isStaticHandler(value) {
    return (typeof value === "object" &&
        value !== null &&
        "__brand" in value &&
        value.__brand === "staticHandler");
}
//# sourceMappingURL=static-handler.js.map