import { loopPost, withTeamKey } from "../lib/loop-api.js";
export async function viewingCreate(params) {
    const { accountId, teamName, department, ...body } = params;
    const result = await withTeamKey(accountId, teamName, "viewings", "loop-viewing-create", async (apiKey) => {
        const path = `/residential/${department}/viewings`;
        return loopPost(apiKey, path, body, "loop-viewing-create", teamName);
    });
    const viewingId = result.result ?? "unknown";
    return `Viewing created (ID: ${viewingId}) for property ${params.propertyId} on ${params.date} at ${params.time} via team "${teamName}".`;
}
//# sourceMappingURL=viewing-create.js.map