local flip = require("love_src.src.world.common.system.flip")
local transform = require("love_src.src.world.common.component.transform")

local template = {}

template.default_data = {
  sfx = "love_src/asset/audio/sfx/book_flip.1.ogg",
  anim_direction = 1,
  fps = 12,
  frame_i = 1,
  image_frame = {
    "love_src/asset/image/book/StoryMode.png",
    "love_src/asset/image/book/StoryModeBook.png",
    "love_src/asset/image/book/StoryModeBook2.png",
    "love_src/asset/image/book/StoryModeBook3.png",
    "love_src/asset/image/book/StoryModeBook4.png",
    "love_src/asset/image/book/StoryModeBook5.png",
    "love_src/asset/image/book/StoryModeBook6.png",
    "love_src/asset/image/book/StoryModeBook7.png",
    "love_src/asset/image/book/StoryModeBook8.png",
    "love_src/asset/image/book/StoryModeBook9.png",
    "love_src/asset/image/book/StoryModeBook11.png",
    "love_src/asset/image/book/StoryModeBook16.png",
  },
  next_trigger_frame = 1,
  run_time = 0,
  trigger_frame = {1},
  position = {0, 0, 0}
}
function template.assemble(e, data)
  e:give(flip.pool.pool[1], data.sfx)
  e:give(flip.pool.pool[2], data.anim_direction)
  e:give(flip.pool.pool[3], data.fps)
  e:give(flip.pool.pool[4], data.frame_i)
  e:give(flip.pool.pool[5], data.image_frame)
  e:give(flip.pool.pool[6], data.next_trigger_frame)
  e:give(flip.pool.pool[7], data.run_time)
  e:give(flip.pool.pool[8], data.trigger_frame)
  e:give(transform.dict.position, data.position)
end

return template
