import OvenTemplate from "view/engine/OvenTemplate";
import BigButton from "view/components/helpers/bigButton";
import MessageBox from "view/components/helpers/messageBox";
import CaptionViewer from "view/components/helpers/captionViewer";
import Spinner from "view/components/helpers/spinner";
//It adds a textview template for testing.
import TextView from 'view/example/textview';
const Helpers = function($container){
let bigButton = "", messageBox = "", captionViewer = "", spinner = "", textView;
const onRendered = function($current, template){
//It creates the TextView right after Helper is loaded on the screen.
textView = TextView($current, api, "Hello world. Nice to meet you.");
//Callback that is called when Helpers are removed in OvenPlayer.
const onDestroyed = function(template){
textView.destroy(); //When Helpers, which is the parent template, is removed, the textView is also removed.
api.off(READY, null, template);
api.off(PLAYER_STATE, null, template);
//The event to be used by Helpers. However, Helpers are used as a container for the template, so there are no special events.
return OvenTemplate($container, "Helpers", null, events, onRendered, onDestroyed );