package infra

import "fmt"

// MetabaseGetDashboard obtiene un dashboard completo de Metabase incluyendo sus cards.
func MetabaseGetDashboard(client MetabaseClient, dashboardID int) (map[string]any, error) {
	path := fmt.Sprintf("/api/dashboard/%d", dashboardID)

	result, err := metabaseRequest("GET", client.BaseURL, client.Token, path, nil)
	if err != nil {
		return nil, fmt.Errorf("metabase get dashboard %d: %w", dashboardID, err)
	}

	return result, nil
}
