import { isSftWithToken, toSft, toSftWithToken } from './Sft';
import { assert } from '../../../utils';
/** @group Model Helpers */
export const isNft = (value) => typeof value === 'object' && value.model === 'nft';
/** @group Model Helpers */
export function assertNft(value) {
    assert(isNft(value), `Expected Nft model`);
}
/** @group Model Helpers */
export const toNft = (metadata, mint, edition) => (Object.assign(Object.assign({}, toSft(metadata, mint)), { model: 'nft', edition }));
/** @group Model Helpers */
export const isNftWithToken = (value) => isNft(value) && 'token' in value;
/** @group Model Helpers */
export function assertNftWithToken(value) {
    assert(isNftWithToken(value), `Expected Nft model with token`);
}
/** @group Model Helpers */
export function assertNftOrSftWithToken(value) {
    assert(isNftWithToken(value) || isSftWithToken(value), `Expected Nft or Sft model with token`);
}
/** @group Model Helpers */
export const toNftWithToken = (metadata, mint, edition, token) => (Object.assign(Object.assign({}, toSftWithToken(metadata, mint, token)), { model: 'nft', edition }));
//# sourceMappingURL=Nft.js.map