/*
 * Copyright 2016 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
 */

#pragma once

#include <ox/std/error.hpp>
#include <ox/std/span.hpp>
#include <ox/std/stringview.hpp>

#include <studio/project.hpp>

#include <nostalgia/gfx/palette.hpp>
#include <nostalgia/gfx/tilesheet.hpp>

namespace nostalgia::gfx {

ox::Error exportSubsheetToPng(
	TileSheet::SubSheet const &s,
	Palette const &pal,
	size_t palPage,
	ox::CStringViewCR dstPath,
	int scale) noexcept;

ox::Error exportSubsheetToPng(
	TileSheet const &src,
	Palette const &pal,
	ox::StringViewCR subsheetPath,
	size_t palPage,
	ox::CStringViewCR dstPath,
	int scale) noexcept;

ox::Error cmdExportTilesheet(studio::Project& project, ox::SpanView<ox::CString> args) noexcept;

}
