// Package controlplane is the neutral, dependency-free public contract that
// pack component providers compile against. It declares the kinds, contracts,
// build context interfaces, and declaration shapes used by the source-backed
// component build seam.
//
// This package imports only the standard library. It must never import the
// engine or any backend/internal package.
package controlplane

// ComponentKind identifies a kind of pack component. The string values are the
// persisted/manifest wire values and must match the engine exactly.
type ComponentKind string

const (
	ComponentKindApprovalProcess         ComponentKind = "approval_process"
	ComponentKindRelatedListRule         ComponentKind = "related_list_rule"
	ComponentKindPageLayout              ComponentKind = "page_layout"
	ComponentKindLayoutAssignment        ComponentKind = "layout_assignment"
	ComponentKindUIAction                ComponentKind = "ui_action"
	ComponentKindReportType              ComponentKind = "report_type"
	ComponentKindSearchScopeOrder        ComponentKind = "search_scope_order"
	ComponentKindSearchAllDefaultFields  ComponentKind = "search_all_default_fields"
	ComponentKindHrefRewriteFields       ComponentKind = "href_rewrite_fields"
	ComponentKindPermissionSetDefinition ComponentKind = "permission_set_definition"
)

// InstallPlanPhase names the phase of the install plan a component participates
// in. Only phases exposed to component providers are declared here.
type InstallPlanPhase string

const (
	InstallPlanPhaseAutomationPrep InstallPlanPhase = "automation_prerequisites"
	InstallPlanPhaseAutomation     InstallPlanPhase = "automation"
	InstallPlanPhaseSecurity       InstallPlanPhase = "security"
	InstallPlanPhaseUISurfaces     InstallPlanPhase = "ui_surfaces"
	InstallPlanPhaseReporting      InstallPlanPhase = "reporting"
)

// ComponentOwnerStrategy describes how a component's owner is discriminated.
type ComponentOwnerStrategy string

const (
	ComponentOwnerStrategyOwnerPack ComponentOwnerStrategy = "owner_pack"
	ComponentOwnerStrategySource    ComponentOwnerStrategy = "source"
)

// Manageability describes how installed component state may be managed.
type Manageability string

const (
	ManageabilityDefaultsOnly Manageability = "defaults_only"
	ManageabilityLocked       Manageability = "locked"
)

// PackCategory identifies a category of pack. The engine spells this type
// Category; the public contract uses PackCategory while preserving the wire
// value.
type PackCategory string

const AppPack PackCategory = "app-pack"
