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

package com.hypixel.hytale.builtin.asseteditor;

import com.hypixel.hytale.common.util.PathUtil;
import java.nio.file.Path;
import javax.annotation.Nonnull;

record AssetPath(@Nonnull String packId, @Nonnull Path path) {
    public static final AssetPath EMPTY_PATH;
    
    public AssetPath(final com.hypixel.hytale.protocol.packets.asseteditor.AssetPath assetPath) {
        this(assetPath.pack, Path.of(assetPath.path, new String[0]));
    }
    
    public com.hypixel.hytale.protocol.packets.asseteditor.AssetPath toPacket() {
        return new com.hypixel.hytale.protocol.packets.asseteditor.AssetPath(this.packId, PathUtil.toUnixPathString(this.path));
    }
    
    @Nonnull
    public String packId() {
        return this.packId;
    }
    
    @Nonnull
    public Path path() {
        return this.path;
    }
    
    static {
        EMPTY_PATH = new AssetPath("", Path.of("", new String[0]));
    }
}
