import { dirname, fromFileUrl, join } from '@std/path'

const SHARED_DIR = dirname(fromFileUrl(import.meta.url))
const CLI_DIR = dirname(SHARED_DIR)
const DATA_DIR = dirname(CLI_DIR)
const ROOT_DIR = dirname(DATA_DIR)

export const DOCS_DIR = join(CLI_DIR, 'shared')
export const CONFIG_JSON = join(DOCS_DIR, 'tilemaker', 'config.json')
export const PROCESS_LUA = join(DOCS_DIR, 'tilemaker', 'process.lua')
export const CONFIG_WORLD_JSON = join(
  DOCS_DIR,
  'tilemaker',
  'config.world.json',
)
export const PROCESS_WORLD_LUA = join(
  DOCS_DIR,
  'tilemaker',
  'process.world.lua',
)
export const REGIONS_FILE = join(DOCS_DIR, 'geofabrik', 'regions.txt')
export const TILES_OUT_DIR = join(ROOT_DIR, 'www', 'static', 'tiles')
export const TILES_MANIFEST = join(TILES_OUT_DIR, 'tiles.json')
export const PBF_DIR = join(DATA_DIR, 'osm')
export const POLY_DIR = join(DATA_DIR, 'poly')
