//! Asset management utilities

use rustelo_core::Result;
use std::path::PathBuf;

/// Asset manager
pub struct AssetManager {
    /// Base assets directory
    base_dir: PathBuf,
}

impl AssetManager {
    /// Create a new asset manager
    pub fn new(base_dir: PathBuf) -> Self {
        Self { base_dir }
    }

    /// Get asset path
    pub fn get_asset_path(&self, asset: &str) -> PathBuf {
        self.base_dir.join(asset)
    }

    /// Check if asset exists
    pub fn asset_exists(&self, asset: &str) -> bool {
        self.get_asset_path(asset).exists()
    }

    /// List all assets matching pattern
    pub fn list_assets(&self, pattern: &str) -> Result<Vec<PathBuf>> {
        // TODO: Implement asset listing with glob patterns
        Ok(vec![self.get_asset_path(pattern)])
    }
}

impl Default for AssetManager {
    fn default() -> Self {
        Self::new(PathBuf::from("assets"))
    }
}
