# Services

Reusable service classes that provide clean interfaces for common plugin operations. Services are instantiated by the Plugin class and injected into components.

## Files

| File               | Class                                  | Purpose                              |
| ------------------ | -------------------------------------- | ------------------------------------ |
| `OptionService.php`| `Bizzswatches\Services\OptionService`  | Read/write plugin settings           |
| `AssetService.php` | `Bizzswatches\Services\AssetService`   | Asset URL and path building          |

## Usage

Services are accessed through the main Plugin instance:

```php
// Get a plugin option
$value = bizzswatches()->get_option('enable_swatches', '1');

// Get asset URL
$css_url = bizzswatches()->assets_url('/css/frontend.css');

// Update a setting
bizzswatches()->update_option('swatch_width', '40');
```

## Adding New Services

1. Create a new class in this directory.
2. Use the `Bizzswatches\Services` namespace.
3. Instantiate it in `Plugin::init_services()`.
4. Add a public getter method in the Plugin class if external access is needed.
