import{m as e,a6 as r,a7 as a,a3 as t,a8 as l,a9 as n,aa as o,n as c,o as i,q as d,r as u,s,y as p,z as h,g as f}from"./vendor.js";import{C as v}from"./core/CoreImageField/index.js";import{T as x}from"./core/Text/index.js";function j(e,r){var a=p(e);if(h){var t=h(e);r&&(t=f(t).call(t,(function(r){return s(e,r).enumerable}))),a.push.apply(a,t)}return a}function g(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?j(Object(a),!0).forEach((function(r){c(e,r,a[r])})):i?d(e,i(a)):j(Object(a)).forEach((function(r){u(e,r,s(a,r))}))}return e}var y={type:"select",render:function(r){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=l.field,o=l.t;return e.jsx(a,g(g(g({clearable:!1},r),{},{options:n.options},n.placeholder&&{placeholder:o(n.placeholder)}),{},{animateMenu:t,parseTitle:n.parseTitle||function(e){return null!=e&&e.title?o(e.title):e},parseValue:n.parseValue||function(e){var r;return null!==(r=null==e?void 0:e.value)&&void 0!==r?r:e}}))}},m=[{type:"text",deserialize:function(e){return""+e},render:function(a){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=t.field,n=t.t;return e.jsx(r,g(g(g({},a),l.placeholder&&{placeholder:n(l.placeholder)}),{},{type:l.valueType||"text"}))}},{type:"textarea",deserialize:function(e){return""+e},render:function(a){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=t.field,n=t.t;return e.jsx(r,g(g(g({},a),{},{tag:"textarea",rows:a.rows||5},l.placeholder&&{placeholder:n(l.placeholder)}),{},{type:l.valueType||"text"}))}},y,{type:"color",render:function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.field,n=a.t;return e.jsx(l,g(g({},r),t.placeholder&&{placeholder:n(t.placeholder)}))}},{type:"core-image",render:function(r){return e.jsx(v,g({},r))}},{type:"date",render:function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.field,l=a.t;return e.jsx(n,g(g({},r),t.placeholder&&{placeholder:l(t.placeholder)}))}},{type:"toggle",render:function(r){var a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).field;return e.jsx(o,g(g({},r),{},{checkedLabel:e.jsx(x,{children:a.checkedLabel}),uncheckedLabel:e.jsx(x,{children:a.uncheckedLabel})}))}}];export{m as B};
//# sourceMappingURL=fields.js.map
