| Current Path : /proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/ |
| Current File : //proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/CreateInstanceFromImageBtn-D60qjybc.js |
import{c as p,al as m,j as o,d as s,R as l}from"./index-BFGypnt-.js";import{u as j}from"./projects-DAlFlfjH.js";const x=({image:c,projectName:e,disabledReason:t})=>{const r=p(),{canCreateInstances:n}=j(),{data:a}=m(e),i=()=>{r(`${l}/ui/project/${encodeURIComponent(e)}/instances/create`,{state:{selectedImage:c,cancelLocation:window.location.pathname}})},u=()=>n(a)?t||"Create instance":"You do not have permission to create instances";return o.jsx(s.Button,{appearance:"base",onClick:i,type:"button",title:u(),hasIcon:!0,disabled:!!t||!n(a),children:o.jsx(s.Icon,{name:"play"})})};export{x as C};