@foreach($form["languages"] as $lang)
@php
$langID=$lang["id"];
$langCode=$lang["code"];
$contentCategoriesListSelect=[];
if($contentType==="content"){
$contentCategoriesList=AdminLibrary::contentCategoriesList($langCode);
foreach ($contentCategoriesList as $contentCategories){
$contentCategoriesListSelect[]=["id"=>$contentCategories["id"],"title"=>$contentCategories["title"]];
}
}elseif($contentType==="product"){
$productCategoriesList=AdminLibrary::productCategoriesList($langCode);
foreach ($productCategoriesList as $productCategories){
$contentCategoriesListSelect[]=["id"=>$productCategories["id"],"title"=>$productCategories["title"]];
}
}
$categoryListJsonDecodeList=[];
$componentTitle=null;
if(is_array($categoryListJsonDecode)){
$categoryListJsonDecodeList=array_key_exists($langCode,$categoryListJsonDecode) ? array_key_exists('category',$categoryListJsonDecode[$langCode])? $categoryListJsonDecode[$langCode]["category"] : []: [];
$componentTitle=array_key_exists($langCode,$categoryListJsonDecode) ? array_key_exists('title',$categoryListJsonDecode[$langCode])? $categoryListJsonDecode[$langCode]["title"] : null: null;
}
@endphp
{{html()->label()->for("lang")->html(trans("admin/themes.components.component_detail.form.lang")) }}
{{html()->span()->id("lang-".$langID)->html($lang["title"])->style(['font-size'=>'12px','margin'=>' 5px 0','font-weight'=>'bold']) }}
{{html()->label()->for("title-".$langCode)->text(trans("admin/themes.components.component_detail.categories-content.form.title")) }}
{{html()->input()->name("language[".$langCode."][title]")->value($componentTitle)->id("title-".$langCode)->class("form-control")}}
{{html()->label()->for("category-".$langCode)->text(trans("admin/themes.components.component_detail.categories-content.form.category")) }}
{{ html()->button()->type("submit")->class("btn btn-info btn-sm")->id("btnAction")->html(trans("admin/themes.components.component_detail.categories-content.form.btn_action")) }}
@endforeach