24 lines
1.2 KiB
TypeScript
24 lines
1.2 KiB
TypeScript
// Metro module 8693 (f8694).
|
|
import { ItemsSortingHat } from "../hooks/useShopProductItems";
|
|
import { isBundleProduct } from "../CollectiblesUtils";
|
|
export function isValidCollectiblesBundle(a0) {
|
|
const itemsSortingHat = new ItemsSortingHat(a0.items);
|
|
const { firstProfileEffect, firstAvatarDecoration, firstNameplate } = itemsSortingHat;
|
|
return firstAvatarDecoration != null && firstProfileEffect != null && firstNameplate == null || firstAvatarDecoration != null && firstProfileEffect != null && firstNameplate != null;
|
|
}
|
|
export function isValidCollectiblesBundleItems(a0) {
|
|
const itemsSortingHat = new ItemsSortingHat(a0);
|
|
const { firstProfileEffect, firstAvatarDecoration, firstNameplate } = itemsSortingHat;
|
|
return firstAvatarDecoration != null && firstProfileEffect != null && firstNameplate == null || firstAvatarDecoration != null && firstProfileEffect != null && firstNameplate != null;
|
|
}
|
|
export function bundleContainsNameplates(a0) {
|
|
let r12 = !!isBundleProduct(a0);
|
|
if (r12) {
|
|
const itemsSortingHat = new ItemsSortingHat(a0.items);
|
|
itemsSortingHat.firstProfileEffect;
|
|
itemsSortingHat.firstAvatarDecoration;
|
|
r12 = itemsSortingHat.firstNameplate != null;
|
|
}
|
|
return r12;
|
|
}
|