| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 | 
							- import { element } from "./element.js";
 
- class submission {
 
-     #name;
 
-     #description;
 
-     #thumbnail;
 
-     #elements;
 
-     constructor(name) {
 
-         if (typeof(name) !== "string") {
 
-             throw "Name must be an string.";
 
-         }
 
-         this.#name = name;
 
-         this.#description = "";
 
-         this.#thumbnail = "";
 
-         this.clean();
 
-     }
 
-     get name() { 
 
-         return this.#name; 
 
-     }
 
-     
 
-     get description() { 
 
-         return this.#description; 
 
-     }
 
-     set description(content) {
 
-         if (typeof(content) !== "string") {
 
-             throw "Description must be an string.";
 
-         }
 
-         this.#description = content;
 
-     }
 
-     get thumbnail() {
 
-         return this.#thumbnail;
 
-     }
 
-     set thumbnail(content) {
 
-         if (typeof(content) !== "string") {
 
-             throw "Thumbnail must be an string.";
 
-         }
 
-         this.#thumbnail = content;
 
-     }
 
-     get elements() {
 
-         return Object.keys(this.#elements);
 
-     }
 
-     add(item) {
 
-         if (!(item instanceof element)) {
 
-             throw "Trying to add something which is not an element.";
 
-         }
 
-         if (item.name in this.#elements) {
 
-             throw "Trying to add element which already exists in submission.";
 
-         }   
 
-         this.#elements[item.name] = item;
 
-     }
 
-     get(name) {
 
-         if (typeof(name) !== "string") {
 
-             throw "Name must be an string.";
 
-         }
 
-         if (!(name in this.#elements)) {
 
-             throw "Trying to get element which not exists.";
 
-         }
 
-         return this.#elements[name];
 
-     }
 
-     clean() {
 
-         this.#elements = {};
 
-     }
 
- }
 
- export { submission };
 
 
  |