"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapFileList = wrapFileList;
const _1 = require("../Class/$");
const ObjectReadOnly_1 = require("../exception/ObjectReadOnly");
const File_1 = require("./File");
function wrapFileList(fileList, system) {
    const files = new (class Files_ extends _1.$ {
        constructor() {
            super(...arguments);
            this.__ = ['A'];
        }
        append(a) {
            throw new ObjectReadOnly_1.ReadOnlyError('file list');
        }
        put(i, data) {
            throw new ObjectReadOnly_1.ReadOnlyError('file list');
        }
        async at(i) {
            const fileItem = fileList.item(i);
            const file = (0, File_1.wrapFile)(fileItem, system);
            return file;
        }
        async length() {
            return fileList.length;
        }
        indexOf(a) {
            throw new ObjectReadOnly_1.ReadOnlyError('file list');
        }
    })(system);
    return files;
}
//# sourceMappingURL=FileList.js.map