// Copyright 2026 The OPA Authors.  All rights reserved.
// Use of this source code is governed by an Apache2
// license that can be found in the LICENSE file.

// Deprecated: This package is intended for older projects transitioning from OPA v0.x and will remain for the lifetime of OPA v1.x, but its use is not recommended.
// For newer features and behaviours, such as defaulting to the Rego v1 syntax, use the corresponding components in the [github.com/open-policy-agent/opa/v1] package instead.
// See https://www.openpolicyagent.org/docs/latest/v0-compatibility/ for more information.
//
// Package refactor implements different refactoring operations over Rego modules.
package refactor

import (
	v1 "github.com/open-policy-agent/opa/v1/refactor"
)

// Error defines the structure of errors returned by refactor.
type Error = v1.Error

// Refactor implements different refactoring operations over Rego modules eg. renaming packages.
type Refactor = v1.Refactor

// New returns a new Refactor object.
func New() *Refactor {
	return v1.New()
}

// MoveQuery holds the set of Rego modules whose package paths and other references are to be rewritten
// as per the mapping defined in SrcDstMapping.
// If validate is true, the moved modules will be compiled to ensure they are valid.
type MoveQuery = v1.MoveQuery

// MoveQueryResult defines the output of a move query and holds the rewritten modules with updated packages paths
// and references.
type MoveQueryResult = v1.MoveQueryResult
