import{r as i}from"./index-BP8_t0zE.js";import{Y as y,r as b,c as g,s as O}from"./defaultI18nProvider-C_r1y4tu.js";import{r as x}from"./createSvgIcon-BeVLBbd8.js";import{j}from"./assertThisInitialized-ClXgY4BW.js";import{L as E}from"./index-qEiLzbkV.js";import{B as P}from"./Button-C3j8Wgdd.js";import{u as h}from"./useResourceContext-BI9mATY-.js";import{u as R}from"./useRecordContext-CmNI-aHo.js";var l={},C=y;Object.defineProperty(l,"__esModule",{value:!0});var c=l.default=void 0,T=C(x()),S=j;c=l.default=(0,T.default)((0,S.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create");var n=function(){return n=Object.assign||function(e){for(var r,a=1,t=arguments.length;a<t;a++){r=arguments[a];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},n.apply(this,arguments)},B=function(e,r){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(a[t[o]]=e[t[o]]);return a},A=function(e){var r=e.icon,a=r===void 0?w:r,t=e.label,o=t===void 0?"ra.action.edit":t,u=e.scrollToTop,d=u===void 0?!0:u,m=e.className,v=B(e,["icon","label","scrollToTop","className"]),p=h(e),s=R(e),_=b();return s?i.createElement(L,n({component:E,to:_({type:"edit",resource:p,id:s.id}),state:I[String(d)],label:o,onClick:N,className:g(q.root,m)},v),a):null},I={true:{_scrollToTop:!0},false:{}},w=i.createElement(c,null),N=function(e){return e.stopPropagation()},f="RaEditButton",q={root:"".concat(f,"-root")},L=O(P,{name:f,overridesResolver:function(e,r){return r.root}})({});export{A as E};
