// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.adventure.shop;

import javax.annotation.Nullable;
import com.hypixel.hytale.server.core.entity.entities.player.pages.choices.ChoiceElement;
import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.universe.PlayerRef;
import com.hypixel.hytale.server.core.entity.entities.player.pages.choices.ChoiceBasePage;

public class ShopPage extends ChoiceBasePage
{
    public ShopPage(@Nonnull final PlayerRef playerRef, final String shopId) {
        super(playerRef, getShopElements(shopId), "Pages/ShopPage.ui");
    }
    
    @Nullable
    protected static ChoiceElement[] getShopElements(final String shopId) {
        final ShopAsset shopAsset = ShopAsset.getAssetMap().getAsset(shopId);
        if (shopAsset == null) {
            return null;
        }
        return shopAsset.getElements();
    }
}
