: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
return {tabTitleWrap,tabContent};
const color = data.color_tab && data.color_tab!=='default'?data.color_tab:'tb_default_color',
{layout_tab:layout= 'minimal',tab_content_tab:arr=[]}=data,
currentActiveWrap=createElement('','tab-nav-current-active tf_hide'),
burgerIcon=createElement('span','tab_burger_icon tf_rel'),
tabNav=createElement('ul','tab-nav tf_clearfix'),
classes=['module','module-tab','ui'],
checkClass=[layout,color,data.css_tab];
classes.push('tab-style-'+data.style_tab);
if(data.tab_appearance_tab){
checkClass[data.tab_appearance_tab.split('|').join(' ')];
for(let i=0;i<checkClass.length;++i){
classes.push(checkClass[i]);
module.className=classes.join(' ');
if('allow_tab' === data.allow_tab_breakpoint && '' !== data.tab_breakpoint){
module.dataset.tabBreakpoint=data.tab_breakpoint;
currentActiveWrap.append(
this.constructor._setEditableContent(createElement('span','tb_tab_title'),'title_tab',arr[0]?.title_tab,'','tab_content_tab',0)
module.appendChild(this.constructor.getModuleTitle(data.mod_title_tab,'mod_title_tab'));
module.append(currentActiveWrap,tabNav);
if(api.activeModel?.id===this.id && !isRestore){
if(cl.contains('tb_add_tab') || cl.contains('tb_del_tab')){
if(cl.contains('tb_add_tab')){
if(api.activeModel?.id===this.id){
Themify.triggerEvent(api.LightBox.el.tfClass('add_new')[0],e.type);
api.undoManager.start('inlineAdd');
const settings=this.get('mod_settings'),
ul=this.el.tfClass('tab-nav')[0],
def=this.constructor.default().tab_content_tab?.[0] || {};
settings.tab_content_tab??=[];
const index=settings.tab_content_tab.push(def),
{tabTitleWrap,tabContent}=this._getItem(def,settings,index);
tabTitleWrap.appendChild(target);
ul.appendChild(tabTitleWrap);
ul.parentNode.appendChild(tabContent);
this.set('mod_settings',settings);
api.undoManager.end('inlineAdd');
const li=target.closest('li'),
index=Themify.convert(li.parentNode.children).indexOf(li);
if(api.activeModel?.id===this.id){
Themify.triggerEvent(api.LightBox.el.tfClass('tb_delete_row')[index],e.type);
api.undoManager.start('inlineDelete');
const settings=this.get('mod_settings'),
id=li.tfTag('a')[0].getAttribute('href'),
addBtn=li.tfClass('tb_add_btn')[0],
content=this.el.querySelector('[data-id="'+id.replace('#','')+'"]');
settings.tab_content_tab.splice(index, 1);
this.set('mod_settings',settings);
li.previousElementSibling?.appendChild(addBtn);
api.undoManager.end('inlineDelete');
for(let i=0,len=arr.length;i<len;++i){
let {tabTitleWrap,tabContent}=this._getItem(arr[i],data, i);
tabTitleWrap.appendChild(createElement('',{role:'button',class:'tb_add_btn tb_add_tab tf_plus_icon tb_disable_sorting',title:'Add Tab'}));
tabNav.appendChild(tabTitleWrap);
module.appendChild(tabContent);