function createPublicRule() {
    return { type: 'public' };
}
function createAuthenticatedRule() {
    return { type: 'authenticated' };
}
function createResourceOwnerRule() {
    return { type: 'resourceOwner', property: '' };
}
function createMatchUserRoleRule() {
    return { type: 'matchUserRole', role: [] };
}
function createMatchUserPropertyRule() {
    return { type: 'matchUserProperty', property: '', value: '' };
}
function createMatchEmailDomainRule() {
    return { type: 'matchEmailDomain', domains: [] };
}
/**
 * Creates an empty access rule of the given type.
 * @param rule The rule to create.
 * @returns The new and empty rule.
 */
export function createEmptyAccessRule(rule) {
    switch (rule) {
        case 'public':
            return createPublicRule();
        case 'authenticated':
            return createAuthenticatedRule();
        case 'resourceOwner':
            return createResourceOwnerRule();
        case 'matchUserRole':
            return createMatchUserRoleRule();
        case 'matchUserProperty':
            return createMatchUserPropertyRule();
        case 'matchEmailDomain':
            return createMatchEmailDomainRule();
        default:
            throw new Error(`Cannot create access rule of unknown type: ${rule}`);
    }
}
//# sourceMappingURL=access_helpers.js.map