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