local this = class("storyTpl")

function this:init(config)
  self.data = config
end

function this:getTplById(id)
  return self.data[id]
end

function this:getIsFastFoward(tpl)
  return tpl.isFastFoward
end

function this:getIsCoverd(tpl)
  return tpl.isCoverd
end

function this:getIsAuto(tpl)
  return tpl.isAuto
end

function this:getCoverdTime(tpl)
  return tpl.coverdTime
end

function this:getSynopsis(tpl)
  return L_Config:provider(tpl.synopsis)
end

function this:getEndCover(tpl)
  return tpl.endCover
end

function this:getInBlack(tpl)
  return tpl.inBlack
end

function this:getOutBlack(tpl)
  return tpl.outBlack
end

function this:getRewardId(tpl)
  return tpl.rewardId
end

function this:getContent(tpl)
  return L_Config:provider(tpl.content)
end

function this:getIsBattle(tpl)
  return tpl.isBattle
end

function this:getStoryType(tpl)
  return tpl.storyType
end

function this:getId(tpl)
  return tpl.id
end

function this:getIsSkip(tpl)
  return tpl.isSkip
end

function this:getContent2(tpl)
  return tpl.content2
end

function this:getIsRepeat(tpl)
  return tpl.isRepeat == 1
end

function this:getConditionType(tpl)
  return tpl.conditionType
end

function this:getConditionValue(tpl)
  return tpl.conditionValue
end

function this:getHideNPC(tpl)
  return tpl.hideNPC
end

function this:getHideHud(tpl)
  return tpl.hideHud
end

function this:getStoryName(tpl)
  return tpl.storyName
end

function this:getPrepareType(tpl)
  return tpl.prepareType or 0
end

function this:getShowNPCTagList(tpl)
  if string.isEmpty(tpl.shouNPC) then
    return {}
  end
  local list = string.split(tpl.shouNPC, "|")
  for i, v in ipairs(list or {}) do
    list[i] = tonumber(v)
  end
  return list
end

return this
