---
alias: "fc.sourcing.profile.modal.button"
aliases:
  - fc.sourcing.profile.modal.button
category: action
module: Core
---

# fc.sourcing.profile.modal.button

Modal confirmation button for sourcing profile activation. Opens a confirmation modal and executes the `activateSourcingProfile` GraphQL mutation.

## When to Use
- Add an "Activate" action button on a sourcing profile detail page
- Trigger sourcing profile activation with a confirmation dialog
- Provide a safe activation workflow with cancel/confirm options

## Key Props
| Prop | Type | Required | What it controls |
|------|------|----------|------------------|
| `action` | `"activate"` | Yes | Action type (currently only `"activate"` is supported) |
| `label` | string | Yes | Button label text (translatable) |
| `title` | string | Yes | Modal title text (translatable) |
| `description` | string | No | Description text shown in the modal body (translatable) |
| `style` | `"Primary"` / `"Secondary"` | No | Button visual style. Defaults to the context style from `useStyle()` or `"Primary"`. |

## Data Binding
Reads route parameters from `useData().variables.routeParams` to construct the mutation input for `activateSourcingProfile`. After successful activation, navigates to the activated profile's detail page using the returned `ref` and `version`.

## Descendants
No -- renders a single button that opens a modal on click.

## Composition Patterns
- `fc.page.section.header` > `fc.sourcing.profile.modal.button` as a header action
- `fc.button.bar` > `fc.sourcing.profile.modal.button` alongside other sourcing profile actions
- Typically used on sourcing profile detail pages as a page-level or section-level action

## Gotchas
- Only supports `action: "activate"` -- the component hardcodes the `activateSourcingProfile` mutation.
- On success, clears all modals and drawers, then navigates to `sourcingProfiles/{ref}/{version}` via hash routing.
- On error, shows an error snackbar with translated message `fc.sourcingProfileModalButton.error.confirmError`.
- The modal uses translated labels: `fc.sourcingProfileModalButton.cancel.label` (Cancel) and `fc.sourcingProfileModalButton.confirm.label` (Confirm).
- Button style defaults to the page context style (from `useStyle()` which reads the page actions context), falling back to `"Primary"`.
- Registered with category `content` in the component registry.

## Manifest Example
```json
{
  "component": "fc.sourcing.profile.modal.button",
  "props": {
    "action": "activate",
    "label": "fc.sourcingProfile.activate.label",
    "title": "fc.sourcingProfile.activate.title",
    "description": "fc.sourcingProfile.activate.description",
    "style": "Primary"
  }
}
```

## AI Parse Notes
- **Primary intent:** Declarative Mystique component definition for manifests.
- **Selection signals:** Match by `alias`, category, and required `Key Props`.
- **Assembly hints:** Combine with compatible parent/child components listed in `Composition Patterns`.
- **Safety checks:** Validate required props and data bindings before manifest generation.
