local drawableSprite = require("structs.drawable_sprite")
local utils = require("utils")
local aelperLib = require("mods").requireFromPlugin("libraries.aelper_lib")

local entity = {}

entity.name = aelperLib.register_template_name("auspicioushelper/TemplateChannelmover")
entity.depth = -13000
entity.nodeLimits = {1,-1}
entity.nodeLineRenderType = "line"


local easings = {"Linear","SineIn","SineOut","SineInOut","QuadIn","QuadOut","CubeIn","CubeOut","Smoothstep","QuartIn","QuartOut","QuintIn","QuintOut"}
local splineTypes = {"simpleLinear","compoundLinear","centripetalNormalized","centripetalDenormalized","uniformNormalized","uniformDenormalized"}
local sounds = {"stone","stonescrape","none"}
entity.placements = {
  {
    name = "main",
    data = {
      template = "",
      depthoffset=0,
      channel = "",
      move_time="1.8",
      asymmetry="1.0",
      easing = "Linear",
      spline = "centripetalNormalized",
      startupTime = "0",
      lastNodeIsKnot = true,
      allowFraction = false,
      sound = "stone",
      bonkMode = false,
      
      complete=false,
      alternateEasing=true,
      shake=false,
      
      _loenn_display_template = true,
    }
  }
}
entity.fieldOrder = {
  "x","y", "template","depthoffset","move_time","asymmetry","easing","startupTime"
}
entity.fieldInformation = function(entity)
    return {
        easing = {options=easings, editable=false},
        template = {
            options = aelperLib.get_template_options(entity)
        },
        spline = {options = splineTypes, editable=true},
        sound = {options = sounds, editable=false},
    }
end

entity.selection = aelperLib.template_selection
entity.draw = aelperLib.get_entity_draw("tchan")

return entity