# GridIconRegistry

> _Since v0.8.0_

Injectable service for managing grid icons.

Use `provideGridIcons()` in your app config to set up icons,
or inject this service for dynamic registration.

#### Example

```typescript
// App-level setup (app.config.ts)
export const appConfig: ApplicationConfig = {
  providers: [
    provideGridIcons({
      expand: '➕',
      collapse: '➖',
      sortAsc: '↑',
      sortDesc: '↓',
    })
  ]
};

// Dynamic registration
@Component({ ... })
export class AppComponent {
  private registry = inject(GridIconRegistry);

  ngOnInit() {
    this.registry.set('filter', '<svg>...</svg>');
  }
}
```

## Methods

### set()

Set an icon override.

```ts
set(name: K, value: GridIcons[K]): void
```

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `name` | <code>K</code> | The icon name (e.g., 'expand', 'collapse', 'filter') |
| `value` | <code><a href="/grid/api/core/interfaces/gridicons/">GridIcons</a>[K]</code> | The icon value (string text or SVG markup) |

***

### get()

Get an icon value.

```ts
get(name: K): GridIcons[K] | undefined
```

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `name` | <code>K</code> |  |

***

### remove()

Remove an icon override.

```ts
remove(name: keyof GridIcons): void
```

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `name` | <code>keyof <a href="/grid/api/core/interfaces/gridicons/">GridIcons</a></code> |  |

***

### has()

Check if an icon has an override.

```ts
has(name: keyof GridIcons): boolean
```

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `name` | <code>keyof <a href="/grid/api/core/interfaces/gridicons/">GridIcons</a></code> |  |

***

### getRegisteredIcons()

Get all registered icon names.

```ts
getRegisteredIcons(): keyof GridIcons[]
```

***
