1010use Illuminate \Database \Eloquent \Collection ;
1111use Illuminate \Database \Eloquent \Model ;
1212use Illuminate \Support \Facades \DB ;
13+ use Illuminate \View \ComponentAttributeBag ;
1314use Redberry \PageBuilderPlugin \Components \Forms \Actions \CreatePageBuilderBlockAction ;
1415use Redberry \PageBuilderPlugin \Components \Forms \Actions \DeletePageBuilderBlockAction ;
1516use Redberry \PageBuilderPlugin \Components \Forms \Actions \EditPageBuilderBlockAction ;
@@ -144,7 +145,7 @@ public function renderDeleteActionButton(string $item, int $index)
144145 'icon ' => 'heroicon-o-trash ' ,
145146 'color ' => 'danger ' ,
146147 'disabled ' => $ deleteAction ->isDisabled (),
147- 'attributes ' => collect ([
148+ 'attributes ' => new ComponentAttributeBag ([
148149 'wire:click ' => "mountFormComponentAction(' $ statePath', ' {$ this ->getDeleteActionName ()}', { item: ' $ item', index: ' $ index' } ) " ,
149150 ]),
150151 ];
@@ -172,7 +173,7 @@ public function renderEditActionButton(string $item, $index)
172173 'icon ' => 'heroicon-o-pencil-square ' ,
173174 'disabled ' => $ editAction ->isDisabled (),
174175 'color ' => 'primary ' ,
175- 'attributes ' => collect ([
176+ 'attributes ' => new ComponentAttributeBag ([
176177 'wire:click ' => "mountFormComponentAction(' $ statePath', ' {$ this ->getEditActionName ()}', { item: ' $ item', index: ' $ index' } ) " ,
177178 ]),
178179 ];
@@ -197,7 +198,7 @@ public function renderReorderActionButton(string $item, $index)
197198 'icon ' => 'heroicon-o-arrows-up-down ' ,
198199 'disabled ' => $ reorderAction ->isDisabled (),
199200 'color ' => 'gray ' ,
200- 'attributes ' => collect ([
201+ 'attributes ' => new ComponentAttributeBag ([
201202 'x-sortable-handle ' => 'x-sortable-handle ' ,
202203 'x-on:click.stop ' => 'x-on:click.stop ' ,
203204 ]),
0 commit comments