<!-- source-hash: bd515872f4cb1c49add8d17631e037c5 -->
A React panel component for displaying and editing permission policies grouped by category, supporting both view and edit modes with animated expand/collapse behavior.

## Key Components

| Export / Internal | Type | Description |
|---|---|---|
| `PolicyConfigurationPanel` | Component (exported) | Root panel rendering all permission categories |
| `CategorySection` | Internal component | Collapsible category with global permission dropdown |
| `PolicyRow` | Internal component | Single policy entry with approval level selector |
| `useAnimatedHeight` | Custom hook | Smooth height animation for expand/collapse transitions |
| `approvalLevelOptions` | Constant | Available levels: `ALLOW`, `ASK_USER`, `ASK_TECHNICIAN`, `DENY` |
| `getApprovalLevelLabel` | Utility fn | Resolves `ApprovalLevel` enum to display string |

## Usage Example

```typescript
import { PolicyConfigurationPanel } from './policy-configuration-panel'
import { PermissionCategory, ApprovalLevel } from '../../types/permissions'

const categories: PermissionCategory[] = [
  {
    id: 'network',
    name: 'Network',
    icon: <NetworkIcon />,
    configurationsCount: 3,
    isExpanded: false,
    globalPermission: 'ALLOW',
    policies: [
      {
        id: 'ping',
        name: 'Ping Host',
        commandPattern: 'ping *',
        toolName: 'network',
        approvalLevel: 'ALLOW',
      },
    ],
  },
]

<PolicyConfigurationPanel
  categories={categories}
  editMode={true}
  onCategoryToggle={(categoryId) => toggleCategory(categoryId)}
  onGlobalPermissionChange={(categoryId, level) => setGlobal(categoryId, level)}
  onPolicyPermissionChange={(categoryId, policyId, level) =>
    updatePolicy(categoryId, policyId, level)
  }
  className="my-4"
/>
```

## Behavior Notes

- In **edit mode**, dropdowns allow selecting approval levels per policy or globally per category
- In **view mode**, current levels are rendered as static text
- `useAnimatedHeight` uses `scrollHeight` measurement + CSS transitions for smooth accordion animation
- Category header clicks and the chevron button both toggle expansion; dropdown clicks use `stopPropagation` to prevent conflicts