import { getProp } from "../objects/get-prop";
import { hasBasePriv } from "./has-base-priv";
import { canEditItem } from "./can-edit-item";
/**
 * Checks if user has access to edit site in Hub
 * Currently, Hub Home sites are not editable
 * In initiative context, check is delegated to canEditItem for the initiative site item
 * @param {IItem} model
 * @param {IUser} user
 * @returns {boolean}
 */
export function canEditSite(model, user) {
    let res = false;
    const isDefaultHubHome = getProp(model, "properties.isDefaultHubHome");
    if (!isDefaultHubHome && hasBasePriv(user)) {
        res = canEditItem(model, user);
    }
    return res;
}
//# sourceMappingURL=can-edit-site.js.map