-- THIS FILE IS AUTOMATICALLY GENERATED.
--
-- Changes to this file will be discarded, ignored, and every other negative
-- word you can come up with that has the same overall meaning.
--
-- This file is licensed under the terms expressed in the LICENSE file.
--
-- Client Version: <%- build.version %>
-- Build Config: <%- build.bkey %>
if WOW_PROJECT_ID ~= <%- config.project %> then
    return;
end

local LibRPMedia = LibStub and LibStub:GetLibrary("LibRPMedia-1.0", true);
if not LibRPMedia then
    return;
end

-- Minor version number of the database.
local DATABASE_VERSION = <%- versionMinor %>;

-- Icon database.
local icons = LibRPMedia:NewDatabase("icons", DATABASE_VERSION);
if icons then
    icons.size = <%- Dump(database.icons.size) %>;
    icons.data = LibRPMedia:CreateLazyTable(function()
        return LibRPMedia:LoadFunctionFromString([=[return {
            file = <%- Dump(database.icons.data.file) %>,
            name = LibRPMedia:LoadFrontCodedStringList(<%- Dump(database.icons.data.name) %>),
            type = setmetatable(<%- Dump(database.icons.data.type) %>, { __index = function() return LibRPMedia.IconType.Texture; end }),
        }]=]);
    end);
end

-- Music database.
local music = LibRPMedia:NewDatabase("music", DATABASE_VERSION);
if music then
    music.size = <%- Dump(database.music.size) %>;
    music.data = LibRPMedia:CreateLazyTable(function()
        return LibRPMedia:LoadFunctionFromString([=[return {
            file = <%- Dump(database.music.data.file) %>,
            name = LibRPMedia:LoadFrontCodedStringList(<%- Dump(database.music.data.name) %>),
            time = <%- Dump(database.music.data.time) %>,
        }]=]);
    end);

    music.index = {
        name = LibRPMedia:CreateLazyTable(function()
            return LibRPMedia:LoadFunctionFromString([=[return {
                row = <%- Dump(database.music.index.name.row) %>,
                key = LibRPMedia:LoadFrontCodedStringList(<%- Dump(database.music.index.name.key) %>),
            }]=]);
        end),
    };
end
