1// automatically generated by the FlatBuffers compiler, do not modify 2/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ 3import { FallingTub } from './falling-tub.js'; 4import { HandFan } from './hand-fan.js'; 5export var Gadget; 6(function (Gadget) { 7 Gadget[Gadget["NONE"] = 0] = "NONE"; 8 Gadget[Gadget["FallingTub"] = 1] = "FallingTub"; 9 Gadget[Gadget["HandFan"] = 2] = "HandFan"; 10})(Gadget || (Gadget = {})); 11export function unionToGadget(type, accessor) { 12 switch (Gadget[type]) { 13 case 'NONE': return null; 14 case 'FallingTub': return accessor(new FallingTub()); 15 case 'HandFan': return accessor(new HandFan()); 16 default: return null; 17 } 18} 19export function unionListToGadget(type, accessor, index) { 20 switch (Gadget[type]) { 21 case 'NONE': return null; 22 case 'FallingTub': return accessor(index, new FallingTub()); 23 case 'HandFan': return accessor(index, new HandFan()); 24 default: return null; 25 } 26} 27