import { bBoxToExtent, orgExtent } from "../../../extent";
/**
 * Get the extent from the entity's location, if it has one.
 * Otherwise, fall back to using the org extent.
 */
export async function getLocationExtent(location, hubRequestOptions) {
    var _a;
    return ((_a = location === null || location === void 0 ? void 0 : location.extent) === null || _a === void 0 ? void 0 : _a.length)
        ? bBoxToExtent(location.extent)
        : await orgExtent(hubRequestOptions);
}
//# sourceMappingURL=getLocationExtent.js.map