import{c as b,T as O,u as _,j as i,A as h,d as T,b as E}from"./dataProvider-3f13e24d.js";import{r as m}from"./index-76fb7be0.js";import{g as P}from"./_baseAssignValue-4b27bc5d.js";import{f as x,s as p}from"./sanitizeFieldRestProps-fb2f7069.js";import{g as j}from"./genericMemo-8de5a1aa.js";import{L as F}from"./Link-ab6162f7.js";import{u as N}from"./useRecordContext-3e1d0ecf.js";import{L as S}from"./Labeled-920c48dc.js";var s=globalThis&&globalThis.__assign||function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},s.apply(this,arguments)},w=globalThis&&globalThis.__rest||function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(o[r[a]]=e[r[a]]);return o},c=function(e){var t=e.className,o=e.source,r=e.emptyText,a=w(e,["className","source","emptyText"]),y=N(e),l=P(y,o),v=b();return l==null?r?m.createElement(O,s({component:"span",variant:"body2",className:t},p(a)),r&&v(r,{_:r})):null:m.createElement(F,s({className:t,href:"mailto:".concat(l),onClick:D,variant:"body2"},p(a)),l)};c.propTypes=x;c.displayName="EmailFieldImpl";var g=j(c),D=function(e){return e.stopPropagation()};const I={title:"Blocks/Fields/EmailField",component:g,parameters:{layout:"centered"},decorators:[e=>L(e)],args:{record:_[0]}},n={render:e=>i(g,{source:"email",...e})},L=e=>i(h,{dataProvider:T,i18nProvider:E,children:i(S,{children:e()})});var u,d,f;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`{
  render: props => {
    return <EmailField source="email" {...props} />;
  }
}`,...(f=(d=n.parameters)==null?void 0:d.docs)==null?void 0:f.source}}};const k=["Default"],H=Object.freeze(Object.defineProperty({__proto__:null,Default:n,__namedExportsOrder:k,default:I},Symbol.toStringTag,{value:"Module"}));export{n as D,H as E};
