using System;
namespace StardewModdingAPI
{
/// Basic metadata for a content asset.
public interface IAssetInfo
{
/*********
** Accessors
*********/
/// The content's locale code, if the content is localized.
/// LEGACY NOTE: when reading this field from an or implementation, for non-localized assets it will return the current game locale (or an empty string for English) instead of null.
string? Locale { get; }
/// The asset name being read.
/// LEGACY NOTE: when reading this field from an or implementation, it's always equivalent to for backwards compatibility.
public IAssetName Name { get; }
/// The with any locale codes stripped.
/// For example, if contains a locale like Data/Bundles.fr-FR, this will be the name without locale like Data/Bundles. If the name has no locale, this field is equivalent.
public IAssetName NameWithoutLocale { get; }
/// The normalized asset name being read. The format may change between platforms; see to compare with a known path.
[Obsolete($"Use {nameof(Name)} or {nameof(NameWithoutLocale)} instead. This property will be removed in SMAPI 4.0.0.")]
string AssetName { get; }
/// The content data type.
Type DataType { get; }
/*********
** Public methods
*********/
/// Get whether the asset name being loaded matches a given name after normalization.
/// The expected asset path, relative to the game's content folder and without the .xnb extension or locale suffix (like 'Data\ObjectInformation').
[Obsolete($"Use {nameof(Name)}.{nameof(IAssetName.IsEquivalentTo)} or {nameof(NameWithoutLocale)}.{nameof(IAssetName.IsEquivalentTo)} instead. This method will be removed in SMAPI 4.0.0.")]
bool AssetNameEquals(string path);
}
}