local f=(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer.PlayerGui.AvatarEditorInGame.Modules local S=require(f.NotLApp.MockId)local m={}function m.mock()local f={}f.userAssetId=tostring(S())f.userId=tostring(S())f.userName=""f.serialNumber=tostring(S())f.priceInRobux=0 return f end function m.fromSellPageAndResellers(f)local S={}S.userAssetId=tostring(f.userAssetId)if f.seller then S.userId=tostring(f.seller.id)S.userName=f.seller.name end S.serialNumber=f.serialNumber and tostring(f.serialNumber)or nil S.priceInRobux=f.price return S end function m.fromPriceInRobux(f,S)local m={}m.userAssetId=tostring(f)m.priceInRobux=S return m end return m
--[[
	Model for an UserAsset
	{
		userAssetId = string,
		userId = name,
		userName = string,
		serialNumber = optional string,
		priceInRobux = optional int
	}
]]
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules
local MockId = require(Modules.NotLApp.MockId)

local UserAssetModel = {}

function UserAssetModel.mock()
	local self = {}

	self.userAssetId = tostring(MockId())
	self.userId = tostring(MockId())
	self.userName = ""
	self.serialNumber = tostring(MockId())
	self.priceInRobux = 0

	return self
end

function UserAssetModel.fromSellPageAndResellers(newData)
	local userAssetInfo = {}

	userAssetInfo.userAssetId = tostring(newData.userAssetId)
	if newData.seller then
		userAssetInfo.userId = tostring(newData.seller.id)
		userAssetInfo.userName = newData.seller.name
	end

	userAssetInfo.serialNumber = newData.serialNumber and tostring(newData.serialNumber) or nil
	userAssetInfo.priceInRobux = newData.price
	return userAssetInfo
end

function UserAssetModel.fromPriceInRobux(userAssetId, priceInRobux)
	local userAssetInfo = {}

	userAssetInfo.userAssetId = tostring(userAssetId)
	userAssetInfo.priceInRobux = priceInRobux

	return userAssetInfo
end

return UserAssetModel
