state = ChartState::fromComponentData($initialData); * $this->dataProvider = $this->resolveProvider( * ChartDataProvider::class, * $this->state->dataProviderName * ); * } * } * } * ``` */ #[Attribute(Attribute::TARGET_CLASS)] final readonly class DataProvider { /** * @param string $name Provider name/identifier (e.g., 'demo', 'database', 'api') */ public function __construct( public string $name = 'default' ) { } }