#!/bin/bash
# Get cache paths using PAP-compliant manifest system

# For now, we'll construct the paths based on the manifest pattern
# In the future, this should call a Rust binary that uses rustelo_utils::cache_*_path()

WORKSPACE_ROOT="$(pwd)"
CACHE_BUILD_ROOT="${WORKSPACE_ROOT}/target/site_build/devtools/build-cache"

case "$1" in
    "client")
        echo "${CACHE_BUILD_ROOT}/client"
        ;;
    "server")
        echo "${CACHE_BUILD_ROOT}/server"
        ;;
    "build"|"")
        echo "${CACHE_BUILD_ROOT}"
        ;;
    "deployment")
        echo "${WORKSPACE_ROOT}/cache"
        ;;
    *)
        echo "Usage: $0 [client|server|build|deployment]" >&2
        exit 1
        ;;
esac
