package daemon

import (
	"context"

	"banger/internal/daemon/dmsnap"
)

// dmSnapshotHandles is retained as a package-local alias for the subpackage
// type so existing call sites and tests read naturally.
type dmSnapshotHandles = dmsnap.Handles

func (n *HostNetwork) createDMSnapshot(ctx context.Context, rootfsPath, cowPath, dmName string) (dmSnapshotHandles, error) {
	return n.privOps().CreateDMSnapshot(ctx, rootfsPath, cowPath, dmName)
}

func (n *HostNetwork) cleanupDMSnapshot(ctx context.Context, handles dmSnapshotHandles) error {
	return n.privOps().CleanupDMSnapshot(ctx, handles)
}

func (n *HostNetwork) removeDMSnapshot(ctx context.Context, target string) error {
	return n.privOps().RemoveDMSnapshot(ctx, target)
}
