<?xml version="1.0" encoding="UTF-8"?>
<csv-inputs xmlns="http://axelor.com/xml/ns/data-import"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/data-import http://axelor.com/xml/ns/data-import/data-import_5.2.xsd">
  	
  	<input file="auth_permission.csv" separator=";" type="com.axelor.auth.db.Permission" search="self.name = :name" call="com.axelor.csv.script.ImportPermission:importPermissionToRole">
        <bind to="canRead" eval="can_read == 'x' ? 'true' : 'false'"/>
        <bind to="canWrite" eval="can_write == 'x' ? 'true' : 'false'"/>
        <bind to="canCreate" eval="can_create == 'x' ? 'true' : 'false'"/>
        <bind to="canRemove" eval="can_remove == 'x' ? 'true' : 'false'"/>
        <bind to="canExport" eval="can_export == 'x' ? 'true' : 'false'"/>
    </input>
    
  	<input file="base_appBusinessProject.csv" separator=";" type="com.axelor.apps.base.db.AppBusinessProject" call="com.axelor.csv.script.ImportApp:importApp">
  		<bind column="dependsOn" to="dependsOnSet" search="self.code in :dependsOn" eval="dependsOn.split(',') as List"/>
  	</input>
  	
    <input file="meta_helpEN.csv" separator=";" type="com.axelor.meta.db.MetaHelp">
    	<bind to="language" eval="'en'" />
    	<bind to="type" eval="'tooltip'" />
    	<bind to="model" eval="com.axelor.inject.Beans.get(com.axelor.meta.db.repo.MetaModelRepository.class).findByName(object)?.getFullName()" column="object" />
    </input>
    
    <input file="meta_helpFR.csv" separator=";" type="com.axelor.meta.db.MetaHelp">
    	<bind to="language" eval="'fr'" />
    	<bind to="type" eval="'tooltip'" />
    	<bind to="model" eval="com.axelor.inject.Beans.get(com.axelor.meta.db.repo.MetaModelRepository.class).findByName(object)?.getFullName()" column="object" />
    </input>
    
    <input file="meta_metaMenu.csv" separator=";" type="com.axelor.meta.db.MetaMenu" search="self.name = :name" update="true" />
  	
  	<input file="meta_metaJsonField.csv" separator=";" type="com.axelor.meta.db.MetaJsonField" 
    	search="self.name = :name and self.model = :model and self.modelField = :modelField and self.jsonModel is null"
    	call="com.axelor.studio.service.ImportService:importJsonField">
    	<bind to="name" column="name"/>
    	<bind to="title" column="title"/>
    	<bind to="type" column="type"/>
    	<bind to="model" column="model"/>
    	<bind to="modelField" column="modelField"/>
    	<bind to="targetModel" column="targetModel"/>
    	<bind to="sequence" column="sequence"/>
    	<bind to="onClick" column="onClick"/>
		<bind to="gridView" column="gridView"/>
		<bind to="formView" column="formView"/>
		<bind to="widgetAttrs" column="widgetAttrs"/>
		<bind to="showIf" column="showIf"/>
   	</input>
   	
</csv-inputs>
	