import{r as u}from"./index-BP8_t0zE.js";import{Y as b,r as _}from"./defaultI18nProvider-C_r1y4tu.js";import{r as y}from"./createSvgIcon-BeVLBbd8.js";import{j as g}from"./assertThisInitialized-ClXgY4BW.js";import{L as O}from"./index-qEiLzbkV.js";import{B as h}from"./Button-C3j8Wgdd.js";import{u as j}from"./useResourceContext-BI9mATY-.js";import{u as R}from"./useRecordContext-CmNI-aHo.js";var c={},p=b;Object.defineProperty(c,"__esModule",{value:!0});var d=c.default=void 0,w=p(y()),E=g;d=c.default=(0,w.default)((0,E.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"RemoveRedEye");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)},S=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},T=function(e){var r=e.icon,a=r===void 0?C:r,t=e.label,o=t===void 0?"ra.action.show":t;e.record,e.resource;var l=e.scrollToTop,f=l===void 0?!0:l,s=S(e,["icon","label","record","resource","scrollToTop"]),m=j(e),i=R(e),v=_();return i?u.createElement(h,n({component:O,to:v({type:"show",resource:m,id:i.id}),state:x[String(f)],label:o,onClick:B},s),a):null},x={true:{_scrollToTop:!0},false:{}},C=u.createElement(d,null),B=function(e){return e.stopPropagation()},z=u.memo(T,function(e,r){return e.resource===r.resource&&(e.record&&r.record?e.record.id===r.record.id:e.record==r.record)&&e.label===r.label&&e.disabled===r.disabled});export{z as P};
