import{f as e,l as t}from"./locale-wDcg0qDg.js";import{formContainerManifest as a}from"./bk-form-container.manifest-y_iJQQlR.js";import{i}from"./manifest--hA2W8VB.js";import"./manifest-J9piKNZo.js";import"./dataSchema-VwIQYPJL.js";import"./httpComponent-AiGk8DOD.js";import"./utils-TB-VQl6t.js";import"./index-9j-GHp9k.js";const o=`The Dynamic Form Card is used to display a card containing a form to edit or create items described by the dataSchema. Custom behavior can also specified, allowing extra actions to be included in the card footer via buttons.

The Dynamic Form Card listens to the display-data event to initialize its form.
`,r=`La Dynamic Form Card viene utilizzata per visualizzare una scheda contenente un form per modificare o creare gli elementi descritti dal dataSchema. È possibile specificare anche un comportamento personalizzato, che consente di includere azioni extra nel footer della scheda tramite pulsanti.

La Dynamic Form Card ascolta l'evento display-data per inizializzare il form.
`,n={...a,docLink:"https://docs.mia-platform.eu/docs/microfrontend-composer/back-kit/components/dynamic_form_card#bk-dynamic-form-card",type:"layout",label:"Dynamic Form Card",description:"Card containing a Form to edit or create items described by the `dataSchema`",descriptionLong:{en:o,it:r},example:JSON.stringify({tag:"bk-dynamic-form-card",properties:{dataSchema:{type:"object",properties:{_id:{type:"string"}}},onSuccess:{type:"file-download",config:{url:"/latest-report"}},onFail:{insert:{type:"push",config:{url:"/error-faq"}}}}}),properties:{...a.properties,customLocale:{__mia_configuration:{attribute:!1,label:"Custom Locale",description:"Custom localized texts shown as component labels",group:"content"},...e,properties:{...e.properties,create:{...e.properties.create,properties:{...e.properties.create.properties,cancelLabel:t("Cancel Button Label")}},update:{...e.properties.update,properties:{...e.properties.update.properties,cancelLabel:t("Cancel Button Label")}}}},header:{type:"object",__mia_configuration:{attribute:!1,label:"Header",description:"The card header",group:"content"},properties:{icon:{__mia_configuration:{label:"Icon"},type:"string",enum:i},title:{__mia_configuration:{"schema-hint":"localized-text",label:"Title"}},badge:{__mia_configuration:{"schema-hint":"localized-text",label:"Badge"}},subtitle:{__mia_configuration:{"schema-hint":"localized-text",label:"Subtitle"}}}},dataIndex:{type:"number",default:0,__mia_configuration:{attribute:"data-index",label:"Data Index",description:"The index from which taking the data where 0 is the first element",group:"content"}},submitBehavior:{type:"string",default:"edit",enum:["add","edit"],__mia_configuration:{attribute:"submit-behavior",label:"Submit Behavior",description:"Data management strategy when submitting: add or edit (default)",group:"interaction"}},omitCancel:{type:"boolean",default:0,__mia_configuration:{attribute:"omit-cancel",label:"Omit Cancel Button",description:"Whether or not to include the default submit button",group:"appearance"}}}};var b=n;export{b as default};
