import { prefab } from '@diez/engine' ; /**
 * The type of a file resource.
 */ export const enum FileType { Raw = 'raw' , Image = 'image' , Font = 'font' , Remote = 'remote' } /**
 * File data.
 */ export interface FileData { src : string ; type : FileType ; } noinheritdoc export class File extends prefab < FileData > ( ) { defaults = { src : '' , type : FileType . Raw , } ; protected sanitize ( data ) { return { src : encodeURI ( data . src ) , type : data . type , } ; } toPresentableValue ( ) { return this . src ; } }